Details
-
Bug
-
Resolution: Fixed
-
Major
-
Morpheus, 7.2.4, 7.1.6, 7.6.1
-
Untriaged
-
0
-
Unknown
Description
When two similar partial indexes are defined, the planner may choose an intersect scan with both indexes when using one of the indexes is more efficient:
CREATE INDEX ix1 ON default(id) WHERE type = "type1";
|
CREATE INDEX ix2 ON default(id, type) WHERE type NOT IN ["type2", "type3"];
|
|
explain SELECT * FROM default WHERE type = "type1" AND id = $my_id;
|
In this case using ix1 is better.