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 -> index not used in LIKE 'aaa%'

index not used in LIKE 'aaa%'

From: Ted Chyn <tedchyn_at_yahoo.com>
Date: 19 Apr 2004 09:56:11 -0700
Message-ID: <44a19320.0404190856.79c7c92c@posting.google.com>


I have a table with 5 million rows with cbo.

An nonunique index is defined on patient_acct. There are only 6 rows qualified for the selection and why index is not used for query 2.

  1. index used with following sql. select patient_acct from pymtitem where (PATIENT_ACCT like '613%3713HENSL')
  2. index was not used with following sql when additional field appear in select clause. full table scan is used for the sql.

select patient_acct,pi_surr_id from pymtitem where (PATIENT_ACCT like '613%3713HENSL').

thanks ted Received on Mon Apr 19 2004 - 11:56:11 CDT

Original text of this message

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