explain.depesz.com

PostgreSQL's explain analyze made readable

Result: iv4p

Settings
# exclusive inclusive rows x rows loops node
1. 12.421 19,047.533 ↓ 1.6 93 1

HashAggregate (cost=67,120.49..67,121.06 rows=57 width=8) (actual time=19,047.521..19,047.533 rows=93 loops=1)

  • Group Key: basket_items.product_sku_id
2. 10.227 19,035.112 ↓ 80.1 14,257 1

Nested Loop (cost=22,714.46..67,119.60 rows=178 width=8) (actual time=2,187.673..19,035.112 rows=14,257 loops=1)

3. 10.447 16,515.653 ↓ 79.6 14,257 1

Nested Loop (cost=22,714.04..67,021.12 rows=179 width=16) (actual time=2,187.648..16,515.653 rows=14,257 loops=1)

4. 45.909 3,199.206 ↑ 1.0 13,306 1

Merge Join (cost=22,713.61..41,709.71 rows=13,813 width=12) (actual time=2,186.980..3,199.206 rows=13,306 loops=1)

  • Merge Cond: (baskets.order_id = vendor_order_fulfillments.order_id)
5. 960.106 960.106 ↑ 5.5 481,249 1

Index Scan using baskets_order_id on baskets (cost=0.43..98,298.72 rows=2,661,697 width=8) (actual time=0.003..960.106 rows=481,249 loops=1)

6. 14.736 2,193.191 ↑ 1.0 13,306 1

Sort (cost=22,713.17..22,747.70 rows=13,813 width=4) (actual time=2,186.967..2,193.191 rows=13,306 loops=1)

  • Sort Key: vendor_order_fulfillments.order_id
  • Sort Method: quicksort Memory: 1008kB
7. 2,173.838 2,178.455 ↑ 1.0 13,306 1

Bitmap Heap Scan on vendor_order_fulfillments (cost=264.37..21,763.27 rows=13,813 width=4) (actual time=6.043..2,178.455 rows=13,306 loops=1)

  • Recheck Cond: (vendor_id = 22)
  • Filter: (NOT reverted)
  • Rows Removed by Filter: 86
  • Heap Blocks: exact=9377
8. 4.617 4.617 ↑ 1.0 13,392 1

Bitmap Index Scan on vendor_order_fulfillments_vendor_id (cost=0.00..260.92 rows=13,932 width=0) (actual time=4.617..4.617 rows=13,392 loops=1)

  • Index Cond: (vendor_id = 22)
9. 13,306.000 13,306.000 ↑ 1.0 1 13,306

Index Scan using basket_items_basket_id on basket_items (cost=0.43..1.82 rows=1 width=12) (actual time=0.423..1.000 rows=1 loops=13,306)

  • Index Cond: (basket_id = baskets.id)
  • Filter: ((NOT removed) AND (NOT removed) AND (product_sku_id = ANY ('{12700,12699,7805,6316,6312,6313,6317,6315,6291,6292,5861,5860,4925,4924,4922,4923,4343,4341,4342,4344,3822,3823,3820,3175,3007,3006,6938,6939,2729,1966,1968,1969,7803,7804,8721,8722,1964,1965,1967,13535,13538,1870,3824,3825,13536,1871,13537,2202,6493,6492,2201,13542,13541,13540,13539,1797,1795,1796,1115,427,446,428,445,116,118,117,7802,8605,3218,3217,3216,2794,2787,2788,2789,2793,2791,2790,2792,2713,2712,2677,2678,2676,2142,2062,1878,1877,1215,1214,1203,1202,541}'::integer[])))
  • Rows Removed by Filter: 4
10. 2,509.232 2,509.232 ↑ 1.0 1 14,257

Index Only Scan using orders_id_pkey on orders (cost=0.42..0.54 rows=1 width=4) (actual time=0.175..0.176 rows=1 loops=14,257)

  • Index Cond: (id = baskets.order_id)
  • Heap Fetches: 14257