Give an index on a table A (col1, col2, col3, col4)
I have been told by my senior staff analyst to code the Where clause as follows:
Where col1 = :val1
and col2 = :val2
and col3 = :val3
and col4 = :val4.
The query is executed thousands of times every day for a few minutes (whole process) interval by 30minutes.
The reason given is that it saves DBMS from reconstructing th query to suit the index at each execution?
Question is if my original query were :
Where col4 = :val4.
and col1 = :val1
and col3 = :val3
and col2 = :val2
would my performance be degraded?