|
|
|
|
|
Re: How can i force a sql use index range scan [message #516200 is a reply to message #516178] |
Fri, 15 July 2011 08:08 |
|
Michel Cadot
Messages: 68716 Registered: March 2007 Location: Saint-Maur, France, https...
|
Senior Member Account Moderator |
|
|
Quote:It can be not so easy. For ex. in case of bug.
Before thinking of a bug, I should think about statistics.
Anyway, a simple explain plan trace will give a first answer.
Then an optimizer trace will help to go further.
Using hint means "I failed to use Oracle" (either writing the query, either following the prerequisites). The bug is very very rare compare to the other cases.
Regards
Michel
[Updated on: Fri, 15 July 2011 08:09] Report message to a moderator
|
|
|
|
Re: How can i force a sql use index range scan [message #516256 is a reply to message #516253] |
Fri, 15 July 2011 13:56 |
|
Michel Cadot
Messages: 68716 Registered: March 2007 Location: Saint-Maur, France, https...
|
Senior Member Account Moderator |
|
|
The key part is "compare to the other cases".
Just read the topics we have here and you will see that not up to date statistics or comparison between 2 different environments are the most ones and Oracle bugs are rare.
I do not say that you failed to use Oracle, I say most of those that post failed to use Oracle. And here we have no information, so I think it tends to the most likely case as the experienced people that post here give the whole and complete information about his/her problem.
I bet if you have some kind of performance problem you do not just post "How can i force a sql use index range scan?".
Regards
Michel
[Updated on: Fri, 15 July 2011 14:02] Report message to a moderator
|
|
|
Re: How can i force a sql use index range scan [message #516273 is a reply to message #516256] |
Fri, 15 July 2011 15:23 |
|
LNossov
Messages: 318 Registered: July 2011 Location: Germany
|
Senior Member |
|
|
I understood you correctly.
I can understand people, who have big problems (regardless real or imaginary) and call for help. So they can post "How can i force a sql use index range scan?". Why not?
In my opinion, they have to get firstly a help, then perhaps investigations, training courses and so on.
Kind regards
Leonid
[Updated on: Fri, 15 July 2011 16:13] Report message to a moderator
|
|
|
|
Re: How can i force a sql use index range scan [message #516440 is a reply to message #516407] |
Mon, 18 July 2011 03:33 |
cookiemonster
Messages: 13958 Registered: September 2008 Location: Rainy Manchester
|
Senior Member |
|
|
BlackSwan wrote on Mon, 18 July 2011 04:17>How can i force a sql use index range scan?
This is an interesting problem statement.
If "index range scan" was really the correct solution,
you would NOT need to ask how to force it,
since you would have already successfully tested index range scan!
You make it sound like the CBO never gets it wrong.
|
|
|