The First Day_Beginning


There are three basic steps to SQL tuning:

1.Figure out which execution plan (path to reach the data your SQL statement demands) you are getting.

2.Change SQL or the database to get a chosen execution plan.

3.Figure out which execution plan is best.

In another word:

1.Which execution plan is best, and how can you find it without trial and error?

2.How does the current execution plan differ from the ideal execution plan, if it does?

3.If the difference between the actual and ideal execution plans is enough to matter, how can you change some combination of the SQL and the database to get close enough to the ideal execution plan for the performance that you need?

4.Does the new execution plan deliver the SQL performance you needed and expected?

benefit:
the only really significant part of the problem, deciding which execution plan is best, is virtually independent of our choice of relational database. The best execution plan is still the best execution plan.

你可能感兴趣的:(sql,performance)