I could obviously test this empirically but I've found that without loading fake data
EXPLAIN shows that Postgres just loads the full page of memory containing the table and scans. I also haven't found the answer in the docs.
My question is, if I have an index on a table such as
(colA, colB) and a query containing
where colA = 'something' will Postgres use this index even though
colB is not in the query? Assume that no index containing just
colA exists. It stands to reason that this index could be useful in the query execution, but I've had a hard time tracking the answer down definitively.