3 ms·
You can intentionally do calculations to 'break’ indexes and take them out of consideration. (E.g., pg will tend to prefer scanning a primary key index if you'r
by wiredfool 10y ago
You can intentionally do calculations to 'break’ indexes and take them out of consideration. (E.g., pg will tend to prefer scanning a primary key index if you're ordering by that in the query. Sometimes this is a very poor choice if there's a more selective index)
There are also statistics that can be tweaked on vacuum analyze to improve the accuracy of the planner.