explain.depesz.com

PostgreSQL's explain analyze made readable

Result: hk6X

Settings
# exclusive inclusive rows x rows loops node
1. 0.003 20,528.130 ↑ 1.0 1 1

Limit (cost=29,665.24..29,665.24 rows=1 width=94) (actual time=20,528.128..20,528.130 rows=1 loops=1)

2. 5,927.721 20,528.127 ↑ 55,151.0 1 1

Sort (cost=29,665.24..29,803.12 rows=55,151 width=94) (actual time=20,528.127..20,528.127 rows=1 loops=1)

  • Sort Key: pl.last_modification_date DESC
  • Sort Method: top-N heapsort Memory: 742kB
3. 14,517.920 14,600.406 ↓ 1.1 59,720 1

Hash Left Join (cost=3,966.50..29,389.49 rows=55,151 width=94) (actual time=18.943..14,600.406 rows=59,720 loops=1)

  • Hash Cond: (pl.service_point_id = sp.id)
4. 66.190 70.495 ↓ 1.1 59,720 1

Bitmap Heap Scan on pricelist pl (cost=1,313.45..26,452.75 rows=55,151 width=956) (actual time=5.354..70.495 rows=59,720 loops=1)

  • Recheck Cond: (account_id IS NULL)
  • Filter: ((date_active <= now()) AND (last_modification_date <= now()))
  • Heap Blocks: exact=7950
5. 4.305 4.305 ↓ 1.1 59,720 1

Bitmap Index Scan on pricelist_account_id_idx (cost=0.00..1,299.66 rows=55,365 width=0) (actual time=4.305..4.305 rows=59,720 loops=1)

  • Index Cond: (account_id IS NULL)
6. 0.074 11.991 ↑ 1.0 447 1

Hash (cost=2,647.47..2,647.47 rows=447 width=8) (actual time=11.991..11.991 rows=447 loops=1)

  • Buckets: 1024 Batches: 1 Memory Usage: 27kB
7. 11.917 11.917 ↑ 1.0 447 1

Seq Scan on service_point sp (cost=0.00..2,647.47 rows=447 width=8) (actual time=0.010..11.917 rows=447 loops=1)

Planning time : 1.346 ms
Execution time : 20,528.454 ms