explain.depesz.com

PostgreSQL's explain analyze made readable

Result: CffS

Settings
# exclusive inclusive rows x rows loops node
1. 0.000 0.000 ↓ 0.0

Hash Right Join (cost=47,463,542.35..55,455,356.92 rows=61,960,700 width=147) (actual rows= loops=)

  • Hash Cond: (((fulfillments.fulfillment ->> 'id'::text))::bigint = _fulfillment_trackings.fulfillment_id)
2. 0.000 0.000 ↓ 0.0

Nested Loop (cost=0.01..1,254,263.08 rows=61,960,700 width=32) (actual rows= loops=)

3. 0.000 0.000 ↓ 0.0

Seq Scan on orders_document_storage orders_document_storage_1 (cost=0.00..15,049.07 rows=619,607 width=18) (actual rows= loops=)

4. 0.000 0.000 ↓ 0.0

Function Scan on jsonb_array_elements fulfillments (cost=0.01..1.01 rows=100 width=32) (actual rows= loops=)

5. 0.000 0.000 ↓ 0.0

Hash (cost=47,456,838.81..47,456,838.81 rows=203,083 width=143) (actual rows= loops=)

6. 0.000 0.000 ↓ 0.0

Merge Left Join (cost=172,998.81..47,456,838.81 rows=203,083 width=143) (actual rows= loops=)

  • Merge Cond: (orders_document_storage.id = sos.store_order_id)
  • Join Filter: ((_fulfillment_trackings.tracking_code)::text = tracking_numbers.tracking_number)
7. 0.000 0.000 ↓ 0.0

Merge Left Join (cost=172,998.38..179,476.55 rows=203,083 width=121) (actual rows= loops=)

  • Merge Cond: ((orders_document_storage.id = supplier_orders_aliexpress.store_order_id) AND ((_fulfillment_trackings.tracking_code)::text = (supplier_orders_aliexpress.tracking_number)::text))
8. 0.000 0.000 ↓ 0.0

Sort (cost=75,803.88..76,311.59 rows=203,083 width=105) (actual rows= loops=)

  • Sort Key: orders_document_storage.id, _fulfillment_trackings.tracking_code
9. 0.000 0.000 ↓ 0.0

Hash Left Join (cost=27,635.16..46,098.38 rows=203,083 width=105) (actual rows= loops=)

  • Hash Cond: (_fulfillment_trackings.order_id = orders_document_storage.id)
10. 0.000 0.000 ↓ 0.0

Seq Scan on _fulfillment_trackings (cost=0.00..5,671.83 rows=203,083 width=75) (actual rows= loops=)

11. 0.000 0.000 ↓ 0.0

Hash (cost=15,049.07..15,049.07 rows=619,607 width=38) (actual rows= loops=)

12. 0.000 0.000 ↓ 0.0

Seq Scan on orders_document_storage (cost=0.00..15,049.07 rows=619,607 width=38) (actual rows= loops=)

13. 0.000 0.000 ↓ 0.0

Materialize (cost=97,194.50..100,380.61 rows=637,222 width=31) (actual rows= loops=)

14. 0.000 0.000 ↓ 0.0

Sort (cost=97,194.50..98,787.55 rows=637,222 width=31) (actual rows= loops=)

  • Sort Key: supplier_orders_aliexpress.store_order_id, supplier_orders_aliexpress.tracking_number
15. 0.000 0.000 ↓ 0.0

Seq Scan on supplier_orders_aliexpress (cost=0.00..20,512.22 rows=637,222 width=31) (actual rows= loops=)

16. 0.000 0.000 ↓ 0.0

Materialize (cost=0.43..36,666,224.09 rows=1,614,820,000 width=62) (actual rows= loops=)

17. 0.000 0.000 ↓ 0.0

Nested Loop (cost=0.43..32,629,174.09 rows=1,614,820,000 width=62) (actual rows= loops=)

18. 0.000 0.000 ↓ 0.0

Nested Loop (cost=0.42..332,774.09 rows=16,148,200 width=62) (actual rows= loops=)

19. 0.000 0.000 ↓ 0.0

Index Scan using supplier_orders_shopify_store_order_id_index on supplier_orders_shopify sos (cost=0.42..9,810.08 rows=161,482 width=30) (actual rows= loops=)

20. 0.000 0.000 ↓ 0.0

Function Scan on jsonb_array_elements fulfillments_1 (cost=0.01..1.00 rows=100 width=32) (actual rows= loops=)

21. 0.000 0.000 ↓ 0.0

Function Scan on jsonb_array_elements_text tracking_numbers (cost=0.01..1.00 rows=100 width=32) (actual rows= loops=)