Optimal plan Versus Execution plan [message #315478] |
Mon, 21 April 2008 12:50  |
shrinika
Messages: 306 Registered: April 2008
|
Senior Member |
|
|
Hi, I have very basic question. What is the difference between Optimal plan and execution plan?
My knowledge here is, optimizer generate the optimum plan and input to row source generator. The row source generator receive the optimal plan from optimizer and output the execution plan for SQL statement.
Thanks
|
|
|
Re: Optimal plan Versus Execution plan [message #315487 is a reply to message #315478] |
Mon, 21 April 2008 13:06   |
moshea
Messages: 51 Registered: February 2008 Location: Dublin, Ireland
|
Member |
|
|
I think this may just be an issue of terminology, but to my mind.
The optimizer generates what it considers to be the optimal plan for a given query based on information available to it ie stats, histograms, whatever. However its possible that this execution plan is not in fact optimal, cos stats etc are wrong/out of date or whatever
Optimizing queries, for example, is all about, looking at the execution plan and deciding if its optimal. (ie is the query being serviced in the most efficient way).
Michael
|
|
|
|