While troubleshooting a server with very high I/O wait, I notice there is a lot of I/O coming from queries which do SELECT max(x) FROM t WHERE y = ?
.
My index is btree (x, y)
.
I notice that the query plan does Index Scan Backward to get the max. Is that bad? Should I worry about that and perhaps add another index (reversed)? Or is there a better way to create an index suitable for this type of queries?