explain.depesz.com

PostgreSQL's explain analyze made readable

Result: WXMl

Settings
# exclusive inclusive rows x rows loops node
1. 0.002 419.594 ↓ 0.0 0 1

Limit (cost=47,703.52..47,703.52 rows=1 width=2,455) (actual time=419.593..419.594 rows=0 loops=1)

  • Buffers: shared hit=3,721 read=14,810, temp read=1,387 written=1,784
2. 0.007 419.592 ↓ 0.0 0 1

Sort (cost=47,703.52..47,703.52 rows=1 width=2,455) (actual time=419.592..419.592 rows=0 loops=1)

  • Sort Key: purchase_orders.created_at DESC
  • Sort Method: quicksort Memory: 25kB
  • Buffers: shared hit=3,721 read=14,810, temp read=1,387 written=1,784
3. 0.000 419.585 ↓ 0.0 0 1

Nested Loop Left Join (cost=11,311.11..47,703.51 rows=1 width=2,455) (actual time=419.585..419.585 rows=0 loops=1)

  • Buffers: shared hit=3,721 read=14,810, temp read=1,387 written=1,784
4. 0.000 419.585 ↓ 0.0 0 1

Nested Loop Left Join (cost=11,310.81..47,703.13 rows=1 width=1,314) (actual time=419.585..419.585 rows=0 loops=1)

  • Join Filter: (locations.id = purchase_orders.location_id)
  • Buffers: shared hit=3,721 read=14,810, temp read=1,387 written=1,784
5. 0.000 419.585 ↓ 0.0 0 1

Nested Loop Left Join (cost=11,310.81..47,698.18 rows=1 width=1,257) (actual time=419.584..419.585 rows=0 loops=1)

  • Join Filter: (vendors.id = purchase_orders.vendor_id)
  • Buffers: shared hit=3,721 read=14,810, temp read=1,387 written=1,784
6. 69.154 471.001 ↓ 0.0 0 1

Gather (cost=11,310.81..47,676.58 rows=1 width=1,208) (actual time=419.583..471.001 rows=0 loops=1)

  • Workers Planned: 2
  • Workers Launched: 2
  • Buffers: shared hit=3,721 read=14,810, temp read=1,387 written=1,784
7. 63.248 401.847 ↓ 0.0 0 3 / 3

Parallel Hash Left Join (cost=10,310.81..46,676.48 rows=1 width=1,208) (actual time=401.845..401.847 rows=0 loops=3)

  • Hash Cond: (purchase_order_lines.purchase_order_id = purchase_orders.id)
  • Filter: (purchase_orders.status IS NULL)
  • Rows Removed by Filter: 1,897
  • Buffers: shared hit=3,721 read=14,810, temp read=1,387 written=1,784
8. 264.794 264.794 ↑ 36.5 1,897 3 / 3

Parallel Seq Scan on purchase_order_lines (cost=0.00..26,362.09 rows=69,164 width=98) (actual time=55.352..264.794 rows=1,897 loops=3)

  • Filter: ((quantity_received < quantity) AND (COALESCE(modified_earliest_delivery_date, '2020-09-14'::date) <= '2020-09-15'::date))
  • Rows Removed by Filter: 496,081
  • Buffers: shared hit=2,215 read=14,810
9. 51.325 73.805 ↑ 1.8 31,301 3 / 3

Parallel Hash (cost=1,960.36..1,960.36 rows=55,236 width=1,110) (actual time=73.805..73.805 rows=31,301 loops=3)

  • Buckets: 4,096 Batches: 32 Memory Usage: 480kB
  • Buffers: shared hit=1,408, temp written=1,400
10. 22.480 22.480 ↑ 1.8 31,301 3 / 3

Parallel Seq Scan on purchase_orders (cost=0.00..1,960.36 rows=55,236 width=1,110) (actual time=0.013..22.480 rows=31,301 loops=3)

  • Buffers: shared hit=1,408
11. 0.000 0.000 ↓ 0.0 0

Seq Scan on vendors (cost=0.00..13.49 rows=649 width=49) (never executed)

12. 0.000 0.000 ↓ 0.0 0

Seq Scan on locations (cost=0.00..3.31 rows=131 width=57) (never executed)

13. 0.000 0.000 ↓ 0.0 0

Index Scan using idx_131692_primary on items (cost=0.29..0.38 rows=1 width=1,141) (never executed)

  • Index Cond: (id = purchase_order_lines.item_id)