Would a partial index be used on a query?
Given this partial index:
CREATE INDEX orders_id_created_at_index ON orders(id) WHERE created_at <
'2013-12-31';
Would this query use the index?
SELECT * FROM orders WHERE id = 123 AND created_at = ''2013-10-12';
As per the documentation, "a partial index can be used in a query
only if the system can recognize that the WHERE condition of the query
mathematically implies the predicate of the index". Does that mean that
the index will or will not be used?
No comments:
Post a Comment