â ïž This post links to an external website. â ïž
An issue I often see folks missing when reviewing query plans, is that all of their scans involve indexes, so they think that the query is likely already as fast (or efficient) as it can be.
Many know that a Seq Scan with a high number of Rows Removed by Filter is a sign an index could help. But the reason an index speeds things up there applies just as much to other scans with large filters, where a better suited index could speed things up! While often we will see index filters show as âRows Removed by Filterâ, sadly there are cases that arenât currently reported by EXPLAIN (but weâll get to that later).
In this post weâll look through several examples, some things to look out for, and how to then go about making things faster.
Itâs worth noting that there are other ways that index use can still be optimised further. One such example that we also highlight via the âIndex Efficiencyâ tips in pgMustard are a high number of Rows Removed by Index Recheck. But this post will be long enough already, so weâll take a look at those another day.
continue reading on www.pgmustard.com
If this post was enjoyable or useful for you, please share it! If you have comments, questions, or feedback, you can email my personal email. To get new posts, subscribe use the RSS feed.