Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
Home -> Community -> Usenet -> c.d.o.server -> Index design question
Hi.
I have a claim system :
CREATE TABLE claim (
company_id NUMBER(4),
claim_no NUMBER(12),
open_date DATE,
close_date DATE,
description VARCHAR2(30),
constraint claim_pk primary key ( company_id, claim_no));
I need to write a query that performs :
SELECT * FROM claim
WHERE company_id = :p1 AND
( open_date between :p2 and :p3 OR
close_date between :p2 AND :p3 );
What do you think is the best index ( or indexes ) to support such query?
TIA. Michael.
Sent via Deja.com http://www.deja.com/
Before you buy.
Received on Tue Nov 23 1999 - 15:52:14 CST