Home » SQL & PL/SQL » SQL & PL/SQL » SQL Hint
SQL Hint [message #215967] Wed, 24 January 2007 08:05 Go to next message
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 Go to previous messageGo to next message
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 Go to previous message
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.
Previous Topic: table corruption?
Next Topic: date condition help
Goto Forum:

Current Time: Wed Aug 16 10:22:14 CDT 2017

Total time taken to generate the page: 0.16584 seconds