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 -> second part of index use

second part of index use

From: <codefragment_at_googlemail.com>
Date: Fri, 06 Jul 2007 13:08:22 -0700
Message-ID: <1183752502.925984.254000@o61g2000hsh.googlegroups.com>


Hi
  You have a table with 'n' columns, 2 of which are employeecode and date. You also have a clustered index on (date, employeecode). You have a query which looks for an employee with dates between DateA and DateB.

  (1) The query uses the index to get to DateA, how does it then find the employee? Is the date/employee hashed in some way? Does it first find the date then scan to get the employee?

(2) In general does it make more sense to cluster on date then employee or employee then date. I would imagine this depends on the queries that take place. Assume about 50,000 employees and about 3 years of dates (so about 1000 days)

ta Received on Fri Jul 06 2007 - 15:08:22 CDT

Original text of this message

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