Oracle FAQ Your Portal to the Oracle Knowledge Grid
HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US
 

Home -> Community -> Usenet -> c.d.o.server -> Re: Sql not picking up primary key index

Re: Sql not picking up primary key index

From: Sean Fitzgerald <sfitzgerald_at_centurytel.net>
Date: Wed, 12 Sep 2001 08:47:28 -0700
Message-ID: <rUIn7.6181$tE2.2623988@feed.centurytel.net>


In your second query you are only asking for the booking id. A select from the index is all that is needed to satisfy your query, so the CBO uses the index. In the first query you are asking for the room number. That information is not in the index so after evaluating how much work it would be to search all the rows in the join, the CBO determines it is cheaper to full table scan. Received on Wed Sep 12 2001 - 10:47:28 CDT

Original text of this message

HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US