Pavan Yadav
Member
Hi All,
I am regular visitor of Progress Talk, a perfect place for Progress Technology related Knowledge and clarified most of my concepts from here.
I faced a strange behaviour of Indexes with a query and so needs to share over here to get a good picture on that and to clarify myself on Index concepts.
I have a table named table1 and having some fields like :
field1, field2, field3, field4, field5, field6 etc.
It's having index as :
index1 pu with fields as in sequence -- field1 field2 field3 field4 field5
index2 u with fields as in sequence -- field1 field3 field5 field4 field2
My query is :
As per me it should pick index1, but when i compiled it using Xref , output shows that the index used is Index2. I tried it 2-3 times to make myself sure for no mistakes.
How can it be possible or in which scenarios it could be possible...??
Please share yout thoughts for the same.
Cheers,
Pavan Yadav
I am regular visitor of Progress Talk, a perfect place for Progress Technology related Knowledge and clarified most of my concepts from here.
I faced a strange behaviour of Indexes with a query and so needs to share over here to get a good picture on that and to clarify myself on Index concepts.
I have a table named table1 and having some fields like :
field1, field2, field3, field4, field5, field6 etc.
It's having index as :
index1 pu with fields as in sequence -- field1 field2 field3 field4 field5
index2 u with fields as in sequence -- field1 field3 field5 field4 field2
My query is :
Code:
for each table1 where field1 = "--" and field2 = "--" and field3 = "--" and field4 = "--" and field5 = "--" no-lock:
display field1.
How can it be possible or in which scenarios it could be possible...??
Please share yout thoughts for the same.
Cheers,
Pavan Yadav