Reputation: 5467
Lets say I know a lot about the distribution of my data, and therefore know the optimal execution plan for a query.
Is there a way to specify my own execution plan, fully circumventing table statistics and the optimizer?
Upvotes: 2
Views: 95
Reputation: 6651
Yes this is possible.
There are a number of ways to offer hints to the optimizer to guide it. If this is not enough control for your situation, then you can use Abstract Query Plans which will then be used to influence the optimizer.
Lots of good information can be found in the Sybase ASE Performance and Tuning Series: Query Processing and Abstract Plans documentation.
The sections on Controlling Optimization and Introduction to Abstract Query Plans should provide the information you are looking for.
Upvotes: 2