Developing Matt

My Technical Journal

Your trivial plan

leave a comment »

\int_0^1 x^2\, dx = 1/3

A query execution is considered a trivial plan when only one plan is possible.  It is trivial due to the table referenced in the query and the indexes existing on them.  The optimizer looks at what you want and then looks at what is available and says, ‘well you can have it but it’s only one path to follow so you’ll have to wait until it gets here.  There isn’t a faster path.’  Recompilation is pointless as is changing the selectivity of your query.  Unless you add a new index you will get the same results.  If you want new behavior then some underlying structure has to change.  You can’t just start thinking that you are going to run on a treadmill every day unless you change your thinking and your perspective, it doesn’t matter how SELECTIVE your treadmill is.  If you don’t change those underlying structures then I’d say your plan is trivial.  You will get the same results.

If you don’t believe me then ask microsoft.

Advertisements

Written by matt

January 21, 2009 at 3:07 pm

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s

%d bloggers like this: