Beginner
Beginner

Reputation: 5467

Specify my own execution plan for query

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

Answers (1)

Mike Gardner
Mike Gardner

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

Related Questions