explain.depesz.com

PostgreSQL's explain analyze made readable

Result: svk7

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

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

  • Buffers: shared hit=19372
2.          

Initplan (for Nested Loop Left Join)

3. 0.003 39.759 ↑ 1.0 1 1

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

  • Buffers: shared hit=19360
4. 6.819 39.756 ↑ 55,944.0 1 1

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

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

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

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

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

  • Index Cond: (id = $0)
  • Buffers: shared hit=19364
7. 0.002 0.002 ↓ 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.002..0.002 rows=0 loops=1)

  • Index Cond: (pl.service_point_id = id)