explain.depesz.com

PostgreSQL's explain analyze made readable

Result: eMej : Optimization for: plan #hCjE

Settings

Optimization path:

Optimization(s) for this plan:

# exclusive inclusive rows x rows loops node
1. 0.002 5,625.608 ↓ 0.0 0 1

Limit (cost=1.71..9,393.51 rows=1 width=282) (actual time=5,625.608..5,625.608 rows=0 loops=1)

2. 0.102 5,625.606 ↓ 0.0 0 1

GroupAggregate (cost=1.71..1,765,660.88 rows=188 width=282) (actual time=5,625.606..5,625.606 rows=0 loops=1)

  • Group Key: vendor_order_fulfillments.id
  • Filter: (count(*) = 2)
  • Rows Removed by Filter: 66
3. 0.106 5,625.504 ↑ 2.8 66 1

Nested Loop (cost=1.71..1,765,657.59 rows=188 width=282) (actual time=25.756..5,625.504 rows=66 loops=1)

4. 0.000 5,624.246 ↑ 1.5 128 1

Nested Loop (cost=1.29..1,765,544.88 rows=192 width=4) (actual time=1.980..5,624.246 rows=128 loops=1)

5. 836.115 2,603.010 ↓ 1.0 1,083,903 1

Nested Loop (cost=0.85..655,755.91 rows=1,083,894 width=8) (actual time=0.008..2,603.010 rows=1,083,903 loops=1)

6. 787.059 787.059 ↑ 1.0 979,836 1

Index Scan Backward using shipments_vof_id_ship_time_shipping_carrier on shipments (cost=0.42..161,890.34 rows=979,854 width=8) (actual time=0.004..787.059 rows=979,836 loops=1)

7. 979.836 979.836 ↑ 1.0 1 979,836

Index Scan using index_shipment_basket_items_on_shipment_id on shipment_basket_items (cost=0.43..0.49 rows=1 width=8) (actual time=0.001..0.001 rows=1 loops=979,836)

  • Index Cond: (shipment_id = shipments.id)
8. 3,251.709 3,251.709 ↓ 0.0 0 1,083,903

Index Scan using basket_items_id_pkey on basket_items (cost=0.43..1.01 rows=1 width=4) (actual time=0.003..0.003 rows=0 loops=1,083,903)

  • Index Cond: (id = shipment_basket_items.basket_item_id)
  • Filter: ((NOT removed) AND (product_sku_id = ANY ('{20403,20188}'::integer[])))
  • Rows Removed by Filter: 1
9. 1.152 1.152 ↑ 1.0 1 128

Index Scan using vendor_order_fulfillments_id_pkey on vendor_order_fulfillments (cost=0.42..0.58 rows=1 width=282) (actual time=0.009..0.009 rows=1 loops=128)

  • Index Cond: (id = shipments.vof_id)
  • Filter: (ship_date IS NOT NULL)
  • Rows Removed by Filter: 0
Planning time : 2.701 ms
Execution time : 5,625.746 ms