SQL Hint [message #215967] |
Wed, 24 January 2007 08:05 |
humair77
Messages: 13 Registered: August 2005
|
Junior Member |
|
|
If a program creates a temporary index for a table, and then later uses that table but without including a 'Hint' that the temp index is to be used, will Oracle use that temp index? Or will it only use the index if the Hint is included in the Select statement?
|
|
|
Re: SQL Hint [message #215968 is a reply to message #215967] |
Wed, 24 January 2007 08:11 |
Cthulhu
Messages: 381 Registered: September 2006 Location: UK
|
Senior Member |
|
|
If you have collected statistics on the table and the optimizer deems that the index would help the query, then it will be used.
|
|
|
Re: SQL Hint [message #215986 is a reply to message #215967] |
Wed, 24 January 2007 09:39 |
JRowbottom
Messages: 5933 Registered: June 2006 Location: Sunny North Yorkshire, ho...
|
Senior Member |
|
|
I'd really recommend against creating and dropping temporary indexes unless you've got a really weird data structure and query profile.
|
|
|