View previous topic :: View next topic |
Author |
Message |
vijay Beginner
Joined: 09 May 2003 Posts: 131 Topics: 64
|
Posted: Tue Sep 05, 2006 2:51 pm Post subject: Question on Indexes |
|
|
Hi ,
I've a table with 1 million rows with multiple indexes.One of the index
is on invc_num , confirm_dt .If I just use Invc_num in my where clause does it go through index scan or tablespace scan?
I want to use an sql like this for each invoice num in a batch program
Code: | select count(*)
where invc_num = :w-invc-num and
eff_dt > :w-date |
eff_dt is another column which is not part of this index.
Would this affect the performance or is there an alternative to this ?
Thanks,
Vijay |
|
Back to top |
|
 |
coolman Intermediate
Joined: 03 Jan 2003 Posts: 283 Topics: 27 Location: US
|
Posted: Tue Sep 05, 2006 4:45 pm Post subject: |
|
|
I guess it would use the index since your invoice number is still in the query - Did you try running an EXPLAIN on this query? Your PLAN TABLE would give the ACCESSTYPE and ACCESSNAME and that should you tell you what index you are using
________
full melt hash |
|
Back to top |
|
 |
|
|