explain.depesz.com

A tool for finding a real cause for slow queries.

Result: vdd

options
Did it help? Consider supporting us - Bitcoin address: 12v2hUztAk2LgzQ9H9LMwuU32urHMjZQnq
# exclusive inclusive rows x rows loops node
1. 0.000 0.000 ↓ 0.0

Sort (cost=24066.87..24066.87 rows=1 width=199) (actual time=.. rows= loops=)

  • Sort Key: public.web_order.time_in
2. 0.000 0.000 ↓ 0.0

HashAggregate (cost=24066.82..24066.86 rows=1 width=199) (actual time=.. rows= loops=)

3. 0.000 0.000 ↓ 0.0

Nested Loop Left Join (cost=18254.99..24066.81 rows=1 width=199) (actual time=.. rows= loops=)

  • Join Filter: (((public.web_order.order_number)::text = (public.web_order.order_number)::text) AND (public.web_order.store_id = public.web_order.store_id))
4. 0.000 0.000 ↓ 0.0

Nested Loop Left Join (cost=13269.73..18282.01 rows=1 width=199) (actual time=.. rows= loops=)

  • Join Filter: (((public.web_order.order_number)::text = (public.web_order.order_number)::text) AND (public.web_order.store_id = public.web_order.store_id))
5. 0.000 0.000 ↓ 0.0

Nested Loop (cost=10470.01..15151.96 rows=1 width=167) (actual time=.. rows= loops=)

6. 0.000 0.000 ↓ 0.0

Nested Loop (cost=10470.01..15151.68 rows=1 width=146) (actual time=.. rows= loops=)

7. 0.000 0.000 ↓ 0.0

Merge Left Join (cost=10470.01..15151.29 rows=1 width=150) (actual time=.. rows= loops=)

  • Merge Cond: (((public.web_order.order_number)::text = (update_row.order_number)::text) AND (public.web_order.store_id = update_row.store_id))
  • Filter: (COALESCE(update_row.web_order_id, max_order.web_order_id) = public.web_order.web_order_id)
8. 0.000 0.000 ↓ 0.0

Merge Left Join (cost=7095.99..11478.78 rows=51109 width=154) (actual time=.. rows= loops=)

  • Merge Cond: (((public.web_order.order_number)::text = (max_order.order_number)::text) AND (public.web_order.store_id = max_order.store_id))
9. 0.000 0.000 ↓ 0.0

Index Scan using web_order_order_number_store_id_idx on web_order (cost=0.00..3953.35 rows=51109 width=150) (actual time=.. rows= loops=)

  • Filter: (status = ANY ('{0,1}'::integer[]))
10. 0.000 0.000 ↓ 0.0

Sort (cost=7095.99..7153.10 rows=22844 width=15) (actual time=.. rows= loops=)

  • Sort Key: max_order.order_number, max_order.store_id
11. 0.000 0.000 ↓ 0.0

Subquery Scan on max_order (cost=4985.26..5442.14 rows=22844 width=15) (actual time=.. rows= loops=)

12. 0.000 0.000 ↓ 0.0

HashAggregate (cost=4985.26..5213.70 rows=22844 width=15) (actual time=.. rows= loops=)

13. 0.000 0.000 ↓ 0.0

Hash Join (cost=3379.18..4803.09 rows=24290 width=15) (actual time=.. rows= loops=)

  • Hash Cond: (public.article.web_order_id = public.web_order.web_order_id)
14. 0.000 0.000 ↓ 0.0

Index Scan using "XIF1article" on article (cost=0.00..877.39 rows=24290 width=4) (actual time=.. rows= loops=)

15. 0.000 0.000 ↓ 0.0

Hash (cost=2606.30..2606.30 rows=61830 width=15) (actual time=.. rows= loops=)

16. 0.000 0.000 ↓ 0.0

Seq Scan on web_order (cost=0.00..2606.30 rows=61830 width=15) (actual time=.. rows= loops=)

17. 0.000 0.000 ↓ 0.0

Sort (cost=3374.01..3388.07 rows=5622 width=15) (actual time=.. rows= loops=)

  • Sort Key: update_row.order_number, update_row.store_id
18. 0.000 0.000 ↓ 0.0

Subquery Scan on update_row (cost=2911.41..3023.85 rows=5622 width=15) (actual time=.. rows= loops=)

19. 0.000 0.000 ↓ 0.0

HashAggregate (cost=2911.41..2967.63 rows=5622 width=15) (actual time=.. rows= loops=)

20. 0.000 0.000 ↓ 0.0

Bitmap Heap Scan on web_order (cost=398.70..2797.31 rows=15214 width=15) (actual time=.. rows= loops=)

  • Recheck Cond: ((contract_id IS NULL) AND (status = 1))
  • Filter: (file_constructed = 0)
21. 0.000 0.000 ↓ 0.0

Bitmap Index Scan on web_order_contract_id_status_idx (cost=0.00..394.89 rows=27374 width=0) (actual time=.. rows= loops=)

  • Index Cond: ((contract_id IS NULL) AND (status = 1))
22. 0.000 0.000 ↓ 0.0

Index Scan using client_pkey on client (cost=0.00..0.38 rows=1 width=4) (actual time=.. rows= loops=)

  • Index Cond: (client_id = public.web_order.client_id)
23. 0.000 0.000 ↓ 0.0

Index Scan using store_store_id_region_id_idx on store (cost=0.00..0.27 rows=1 width=21) (actual time=.. rows= loops=)

  • Index Cond: (store_id = public.web_order.store_id)
24. 0.000 0.000 ↓ 0.0

HashAggregate (cost=2799.72..2923.59 rows=8258 width=15) (actual time=.. rows= loops=)

25. 0.000 0.000 ↓ 0.0

Bitmap Heap Scan on web_order (cost=306.12..2632.10 rows=22350 width=15) (actual time=.. rows= loops=)

  • Recheck Cond: (contract_id IS NOT NULL)
  • Filter: (status = ANY ('{0,1}'::integer[]))
26. 0.000 0.000 ↓ 0.0

Bitmap Index Scan on "IX_web_order_contract_id_fkey_web_order" (cost=0.00..300.54 rows=27038 width=0) (actual time=.. rows= loops=)

  • Index Cond: (contract_id IS NOT NULL)
27. 0.000 0.000 ↓ 0.0

HashAggregate (cost=4985.26..5213.70 rows=22844 width=19) (actual time=.. rows= loops=)

28. 0.000 0.000 ↓ 0.0

Hash Join (cost=3379.18..4803.09 rows=24290 width=19) (actual time=.. rows= loops=)

  • Hash Cond: (public.article.web_order_id = public.web_order.web_order_id)
29. 0.000 0.000 ↓ 0.0

Index Scan using "XIF1article" on article (cost=0.00..877.39 rows=24290 width=4) (actual time=.. rows= loops=)

30. 0.000 0.000 ↓ 0.0

Hash (cost=2606.30..2606.30 rows=61830 width=23) (actual time=.. rows= loops=)

31. 0.000 0.000 ↓ 0.0

Seq Scan on web_order (cost=0.00..2606.30 rows=61830 width=23) (actual time=.. rows= loops=)