What index/indexes would you recommend to be created on the table for making the following type of query more efficient:
SELECT MAX(val1)
FROM table
WHERE val2 = 'x' OR val3 = 'y'
x and y are of course variable. val2 and val3 are almost always unique, some duplicates may occur.
have an index on
val2+val1and another onval3+val1and write query like: