Home » RDBMS Server » Performance Tuning » Different explain plan (Different explain plan)
Different explain plan [message #273275] Tue, 09 October 2007 16:20 Go to next message
rubhatta
Messages: 7
Registered: August 2007
Junior Member
Hi All,

I have a query that does not return any records right now. The query is as below:

SELECT /*+ rule */
h.tran_id, h.web_confirmation_no
FROM ordstat_hdr_buffer h
WHERE h.status_code = 'N'

When I check the explain plan, it shows that index is being used. However, when I remove the Rule hint and check the explain plan again, it shows full table access.
I understand that CBO is being used in the latter case, but why doesn't it use the index?

Thanks.
Re: Different explain plan [message #273276 is a reply to message #273275] Tue, 09 October 2007 16:23 Go to previous messageGo to next message
BlackSwan
Messages: 25050
Registered: January 2009
Location: SoCal
Senior Member
http://www.orafaq.com/forum/t/88153/0/
please read & follow above guidelines.

Are statistics current on table & index?
Re: Different explain plan [message #273344 is a reply to message #273275] Wed, 10 October 2007 01:30 Go to previous message
Michel Cadot
Messages: 64153
Registered: March 2007
Location: Nanterre, France, http://...
Senior Member
Account Moderator
Because there is no index.

Regards
Michel
Previous Topic: Rule for optimizing the query (merged)
Next Topic: Index creation....
Goto Forum:
  


Current Time: Sun Dec 11 04:23:11 CST 2016

Total time taken to generate the page: 0.05814 seconds