explain.depesz.com

PostgreSQL's explain analyze made readable

Result: 8X1y

Settings
# exclusive inclusive rows x rows loops node
1. 0.000 38.749 ↑ 1.0 1 1

Nested Loop Left Join (cost=25,010.80..25,015.86 rows=1 width=86) (actual time=38.630..38.749 rows=1 loops=1)

  • Buffers: shared hit=19370
2.          

Initplan (for Nested Loop Left Join)

3. 0.003 37.825 ↑ 1.0 1 1

Limit (cost=25,009.98..25,009.98 rows=1 width=12) (actual time=37.823..37.825 rows=1 loops=1)

  • Buffers: shared hit=19358
4. 6.877 37.822 ↑ 55,944.0 1 1

Sort (cost=25,009.98..25,149.84 rows=55,944 width=12) (actual time=37.821..37.822 rows=1 loops=1)

  • Sort Key: pricelist.last_modification_date DESC
  • Sort Method: top-N heapsort Memory: 25kB
  • Buffers: shared hit=19358
5. 30.945 30.945 ↓ 1.1 60,170 1

Index Scan using pricelist_account_id_idx on pricelist (cost=0.42..24,730.26 rows=55,944 width=12) (actual time=0.014..30.945 rows=60,170 loops=1)

  • Index Cond: (account_id IS NULL)
  • Filter: ((date_active <= '2020-01-30 00:00:00'::timestamp without time zone) AND (last_modification_date <= '2020-01-30 00:00:00'::timestamp without time zone))
  • Buffers: shared hit=19358
6. 37.859 37.859 ↑ 1.0 1 1

Index Scan using price_list_pkey on pricelist pl (cost=0.42..2.44 rows=1 width=956) (actual time=37.857..37.859 rows=1 loops=1)

  • Index Cond: (id = $0)
  • Buffers: shared hit=19362
7. 0.006 0.006 ↓ 0.0 0 1

Index Scan using service_point_pkey on service_point sp (cost=0.40..3.42 rows=1 width=8) (actual time=0.006..0.006 rows=0 loops=1)

  • Index Cond: (pl.service_point_id = id)