explain.depesz.com

PostgreSQL's explain analyze made readable

Result: RbS

Settings
# exclusive inclusive rows x rows loops node
1. 0.012 10,724.557 ↑ 200.0 1 1

Sort (cost=940,463.97..940,464.47 rows=200 width=579) (actual time=10,724.556..10,724.557 rows=1 loops=1)

  • Sort Key: (CASE WHEN (core_eleitor.renda_mensal_presumida > 3390::numeric) THEN 3390 ELSE CASE WHEN (core_eleitor.renda_mensal_presumida > 2034::numeric) THEN 2034 ELSE CASE WHEN (core_eleitor.renda_mensal_presumida > 1356::numeric) THEN 1356 ELSE (-1) END END END)
  • Sort Method: quicksort Memory: 25kB
  • Buffers: shared hit=513 read=227643
2. 827.032 10,724.545 ↑ 200.0 1 1

HashAggregate (cost=940,454.33..940,456.33 rows=200 width=579) (actual time=10,724.544..10,724.545 rows=1 loops=1)

  • Buffers: shared hit=513 read=227643
3. 5,853.480 9,897.513 ↑ 8.6 79,855 1

HashAggregate (cost=686,700.72..786,821.19 rows=690,486 width=1,237) (actual time=9,667.403..9,897.513 rows=79,855 loops=1)

  • Buffers: shared hit=513 read=227643
4. 4,044.033 4,044.033 ↓ 1.0 6,919,458 1

Seq Scan on core_eleitor (cost=0.00..375,982.16 rows=6,904,857 width=1,237) (actual time=0.071..4,044.033 rows=6,919,458 loops=1)

  • Filter: ((idade >= 4) AND (idade <= 100))
  • Rows Removed by Filter: 2933588
  • Buffers: shared hit=513 read=227643
Total runtime : 10,728.353 ms