explain.depesz.com

PostgreSQL's explain analyze made readable

Result: NsPQ

Settings
# exclusive inclusive rows x rows loops node
1. 0.005 20,440.649 ↑ 1.0 1 1

Limit (cost=29,697.00..29,697.00 rows=1 width=94) (actual time=20,440.646..20,440.649 rows=1 loops=1)

  • Buffers: shared hit=344391
2. 6,024.723 20,440.644 ↑ 55,944.0 1 1

Sort (cost=29,697.00..29,836.86 rows=55,944 width=94) (actual time=20,440.644..20,440.644 rows=1 loops=1)

  • Sort Key: pl.last_modification_date DESC
  • Sort Method: top-N heapsort Memory: 742kB
  • Buffers: shared hit=344391
3. 14,347.931 14,415.921 ↓ 1.1 60,165 1

Hash Left Join (cost=3,974.43..29,417.28 rows=55,944 width=94) (actual time=13.623..14,415.921 rows=60,165 loops=1)

  • Hash Cond: (pl.service_point_id = sp.id)
  • Buffers: shared hit=344391
4. 57.115 60.631 ↓ 1.1 60,165 1

Bitmap Heap Scan on pricelist pl (cost=1,319.62..26,474.86 rows=55,944 width=956) (actual time=4.624..60.631 rows=60,165 loops=1)

  • Recheck Cond: (account_id IS NULL)
  • Filter: ((date_active <= now()) AND (last_modification_date <= now()))
  • Heap Blocks: exact=8054
  • Buffers: shared hit=8270
5. 3.516 3.516 ↓ 1.1 60,165 1

Bitmap Index Scan on pricelist_account_id_idx (cost=0.00..1,305.63 rows=56,162 width=0) (actual time=3.516..3.516 rows=60,165 loops=1)

  • Index Cond: (account_id IS NULL)
  • Buffers: shared hit=216
6. 0.091 7.359 ↑ 1.2 448 1

Hash (cost=2,648.25..2,648.25 rows=525 width=8) (actual time=7.359..7.359 rows=448 loops=1)

  • Buckets: 1024 Batches: 1 Memory Usage: 27kB
  • Buffers: shared hit=2643
7. 7.268 7.268 ↑ 1.2 448 1

Seq Scan on service_point sp (cost=0.00..2,648.25 rows=525 width=8) (actual time=0.011..7.268 rows=448 loops=1)

  • Buffers: shared hit=2643