Home » SQL & PL/SQL » SQL & PL/SQL » Order of index columns
Order of index columns [message #18908] Wed, 20 February 2002 19:18 Go to next message
Jens Vogelgesang
Messages: 23
Registered: January 2002
Junior Member
I've a table containig several columns. Primary key consists out of to numbers.
(1,1)(1,2),(1,3),(1,4),(2,4),(2,5),(2,6)
Question: Whicj index will work faster?
field_1, field 2
or
field_2, field_1
Re: Order of index columns [message #18912 is a reply to message #18908] Thu, 21 February 2002 00:15 Go to previous messageGo to next message
pratap kumar tripathy
Messages: 660
Registered: January 2002
Senior Member
both are same , but index will be picked depending on the order of the condition specified in where clause
Re: Order of index columns [message #18942 is a reply to message #18912] Thu, 21 February 2002 22:19 Go to previous message
Jens Vogelgesang
Messages: 23
Registered: January 2002
Junior Member
The fist column has only a few different values
where the second has millions of different values.

Is it faster to access by column_1, columns 2
or
column 2, column 1.
Previous Topic: sysdate
Next Topic: Re: ORA-20000 ORU-10027
Goto Forum:
  


Current Time: Fri Sep 17 11:32:18 CDT 2021