Conceptual
Login

Rows Removed by Filter: Proof the Engine Read Rows It Threw Away

EXPLAIN ANALYZE reports, for each step, how many rows it tested and discarded, as 'Rows Removed by Filter'. A step that returns 12 rows after removing 4,000,000 read four million rows to give you twelve, which is the definition of a query doing too much work. The distinction to watch is Index Cond versus Filter: a condition in Index Cond narrowed the search, while a condition in Filter was checked only after the rows were fetched. Learning to read that split tells you exactly which part of your WHERE clause the index actually served.

Questions this Concept answers

  • Why is a condition appearing under `Filter` worse news than the same condition appearing under `Index Cond`?