Timeline for Can PostgreSQL use multiple partial indexes per query?
Current License: CC BY-SA 3.0
5 events
when toggle format | what | by | license | comment | |
---|---|---|---|---|---|
Jul 20, 2018 at 0:38 | comment | added | tantrix |
There is a pretty impactful typo in this answer: CREATE INDEX xs_below_50000 ON partial(x) WHERE (x < 5000); That x < 5000 should be x < 50000 . With that corrected, both the second and third queries pick up the partial indexes. E.g., ``` Index Scan using xs_below_50000 on partial (cost=0.29..1659.47 rows=50219 width=4) Index Cond: (x > 20)
|
|
Mar 14, 2017 at 23:39 | comment | added | sudo | One more limitation I've seen is that it can't use two partial indexes together in a case where it absolutely needs both. For example, if I have one index cover IDs < 500 and the other cover IDs ≥ 500, then I select without an ID constraint, it never uses the indexes. I was trying to do that so I could kinda parallelize index creation... | |
Feb 6, 2015 at 19:57 | comment | added | Jim Bob | Really an amazing answer. Thank you very much. | |
Feb 6, 2015 at 19:57 | vote | accept | Jim Bob | ||
Feb 6, 2015 at 6:44 | history | answered | Craig Ringer | CC BY-SA 3.0 |