‎2007 Aug 08 8:33 PM
Hi,
The order of the fields in Where clause in OpenSQL statements is important to get the right index?
Select a b c from t1
where
d = p_d and
e = p_e
Or
Select a b c from t1
where
e = p_e and
d = p_d
Index:
columns e and d.
Thanks !
‎2007 Aug 08 8:35 PM
HI,
Both will give you the same result.. but it is always good to pass the sequence as in the table.. the performance will be good when you follow the sequece of occurance of the fields.
Thanks
Mahesh
‎2007 Aug 08 8:36 PM
It should be better to provide the fields for the WHERE statement in order...That way the table can be accessed faster.
Greetings,
Blag.
‎2007 Aug 08 8:38 PM
This is a duplicate post - please check my answer in the other one.
Rob
‎2007 Aug 08 8:58 PM