explain.depesz.com

PostgreSQL's explain analyze made readable

Result: RPNK : og warehouses

Settings
# exclusive inclusive rows x rows loops node
1. 0.016 22.345 ↓ 5.0 5 1

Nested Loop (cost=2,377.01..2,818.09 rows=1 width=44) (actual time=20.705..22.345 rows=5 loops=1)

  • Buffers: shared hit=344
2. 0.007 22.319 ↓ 5.0 5 1

Nested Loop (cost=2,376.72..2,817.72 rows=1 width=23) (actual time=20.685..22.319 rows=5 loops=1)

  • Buffers: shared hit=333
3. 0.010 22.284 ↓ 2.0 4 1

Nested Loop (cost=2,376.16..2,800.54 rows=2 width=16) (actual time=20.216..22.284 rows=4 loops=1)

  • Buffers: shared hit=312
4. 2.371 22.219 ↑ 1.0 5 1

Merge Join (cost=2,375.74..2,787.85 rows=5 width=16) (actual time=15.657..22.219 rows=5 loops=1)

  • Buffers: shared hit=292
5. 0.007 0.038 ↑ 1.0 5 1

Sort (cost=26.31..26.32 rows=5 width=8) (actual time=0.036..0.038 rows=5 loops=1)

  • Sort Key: s.designer_id
  • Sort Method: quicksort Memory: 25kB
  • Buffers: shared hit=22
6. 0.031 0.031 ↑ 1.0 5 1

Index Only Scan using styles_id_incl_designer_id_idx on styles s (cost=0.43..26.25 rows=5 width=8) (actual time=0.011..0.031 rows=5 loops=1)

  • Index Cond: (s.id = ANY ('{5583619,8799200,7614893,2519420,8774652}'::integer[]))
  • Heap Fetches: 3
  • Buffers: shared hit=22
7. 3.965 19.810 ↓ 1.0 24,138 1

Unique (cost=2,349.43..2,473.96 rows=23,001 width=105) (actual time=13.603..19.81 rows=24,138 loops=1)

  • Buffers: shared hit=270
8. 11.617 15.845 ↓ 1.0 25,255 1

Sort (cost=2,349.43..2,411.69 rows=24,905 width=105) (actual time=13.6..15.845 rows=25,255 loops=1)

  • Sort Key: dw.designer_id, dw.order_nbr, dw.id
  • Sort Method: quicksort Memory: 1,952kB
  • Buffers: shared hit=270
9. 4.228 4.228 ↓ 1.0 25,255 1

Seq Scan on designer_warehouses dw (cost=0..530.85 rows=24,905 width=105) (actual time=0.008..4.228 rows=25,255 loops=1)

  • Filter: (NOT dw.deleted)
  • Buffers: shared hit=270
10. 0.055 0.055 ↑ 1.0 1 5

Index Scan using designer_warehouse_id_idx on wip_inventory wi (cost=0.42..2.53 rows=1 width=8) (actual time=0.01..0.011 rows=1 loops=5)

  • Index Cond: (wi.designer_warehouse_id = dw.id)
  • Filter: ((NOT wi.deleted) AND (wi.inventory_date IS NULL))
  • Buffers: shared hit=20
11. 0.028 0.028 ↑ 1.0 1 4

Index Scan using wip_inventory_items_inventory_style_color_size on wip_inventory_items wii (cost=0.56..8.58 rows=1 width=19) (actual time=0.006..0.007 rows=1 loops=4)

  • Index Cond: ((wii.wip_inventory_id = wi.id) AND (wii.style_id = s.id))
  • Buffers: shared hit=21
12. 0.010 0.010 ↑ 1.0 1 5

Index Only Scan using designers_pkey on designers d (cost=0.29..0.35 rows=1 width=4) (actual time=0.002..0.002 rows=1 loops=5)

  • Index Cond: (d.id = dw.designer_id)
  • Buffers: shared hit=11
Planning time : 1.188 ms
Execution time : 22.415 ms