Subject | index keys |
---|---|
Author | Duilio Foschi |
Post date | 2002-01-25T18:20:30Z |
I will often need to query a large database according the fields N_MOV,
Y_MOV, both integers, i.e. I will often need to query all the records that
have given values for N_MOV and Y_MOV.
To this purpose, I am going to build an index that has the 2 fields as keys.
I wonder if _the order_ by which I build the index can have any influence
on the query.
In other words, do the command
create index MyIndex on MyTable (N_MOV,Y_MOV)
and
create index MyIndex on MyTable (Y_MOV,N_MOV)
have equal results (also in terms of time) on my queries ?
Thank you
Duilio Foschi
Y_MOV, both integers, i.e. I will often need to query all the records that
have given values for N_MOV and Y_MOV.
To this purpose, I am going to build an index that has the 2 fields as keys.
I wonder if _the order_ by which I build the index can have any influence
on the query.
In other words, do the command
create index MyIndex on MyTable (N_MOV,Y_MOV)
and
create index MyIndex on MyTable (Y_MOV,N_MOV)
have equal results (also in terms of time) on my queries ?
Thank you
Duilio Foschi