explain.depesz.com

PostgreSQL's explain analyze made readable

Result: ZcpB

Settings
# exclusive inclusive rows x rows loops node
1. 0.004 20,378.068 ↑ 1.0 1 1

Limit (cost=29,695.42..29,695.42 rows=1 width=94) (actual time=20,378.065..20,378.068 rows=1 loops=1)

  • Buffers: shared hit=344420
2. 6,055.200 20,378.064 ↑ 55,944.0 1 1

Sort (cost=29,695.42..29,835.28 rows=55,944 width=94) (actual time=20,378.063..20,378.064 rows=1 loops=1)

  • Sort Key: pl.last_modification_date DESC
  • Sort Method: top-N heapsort Memory: 742kB
  • Buffers: shared hit=344420
3. 14,260.434 14,322.864 ↓ 1.1 60,170 1

Hash Left Join (cost=3,972.70..29,415.70 rows=55,944 width=94) (actual time=9.543..14,322.864 rows=60,170 loops=1)

  • Hash Cond: (pl.service_point_id = sp.id)
  • Buffers: shared hit=344420
4. 55.306 58.750 ↓ 1.1 60,170 1

Bitmap Heap Scan on pricelist pl (cost=1,319.62..26,474.86 rows=55,944 width=956) (actual time=4.512..58.750 rows=60,170 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.444 3.444 ↓ 1.1 60,170 1

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

  • Index Cond: (account_id IS NULL)
  • Buffers: shared hit=216
6. 0.075 3.680 ↑ 1.0 448 1

Hash (cost=2,647.48..2,647.48 rows=448 width=8) (actual time=3.679..3.680 rows=448 loops=1)

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

Seq Scan on service_point sp (cost=0.00..2,647.48 rows=448 width=8) (actual time=0.008..3.605 rows=448 loops=1)

  • Buffers: shared hit=2643