Changing the defaut number of Plans checked by optimzer [message #602321] |
Tue, 03 December 2013 03:42 |
deadpoet69
Messages: 3 Registered: August 2006
|
Junior Member |
|
|
Dear,
I'm looking for a command to change the default number of plans , the optimizer checked before choosing the better cost.
In the courses , we have seen , that the optimizer got a little time to get the first 500 plans and then via the cost base , choose the better one.
I need to increase this number of plans, 1000 , 2000 ... just to see if it helps us on a special case.
Anyone remember a command fot that ?
thanks
|
|
|
|
|
Re: Changing the defaut number of Plans checked by optimzer [message #602412 is a reply to message #602403] |
Wed, 04 December 2013 04:07 |
Roachcoach
Messages: 1576 Registered: May 2010 Location: UK
|
Senior Member |
|
|
I had trouble with this - it still "cuts the corner" if it believes the query is going to be fast.
From my experiences there is an internal algorithm which prevents the optimizer spending "too long" on optimization relative to query time.
To use ridiculous figures for the sakes of example what I mean is that it'll not spend 10 seconds forming plans when every plan it has run through on the way is coming to a 0.5 seconds estimate, it just stops trying and runs it - no point spending significantly longer than the query will take trying to think how to do it.
Basically it's done to avoid "overthinking" and to date I've not been able to disable that in a way that would still leave a "real" plan coming out.
|
|
|