explain.depesz.com

A tool for finding a real cause for slow queries.

Result: v5N

options
Did it help? Consider supporting us - Bitcoin address: 12v2hUztAk2LgzQ9H9LMwuU32urHMjZQnq
# exclusive inclusive rows x rows loops node
1. 0.031 331,766.239 ↑ 1.0 100 1

Limit (cost=1.29..578.64 rows=100 width=750) (actual time=2,143.346..331,766.239 rows=100 loops=1)

2. 330,674.641 331,766.208 ↑ 782.2 100 1

Nested Loop Left Join (cost=1.29..451,609.45 rows=78,221 width=750) (actual time=2,143.343..331,766.208 rows=100 loops=1)

3. 0.507 1,091.467 ↑ 782.2 100 1

Nested Loop Left Join (cost=1.29..232,226.94 rows=78,221 width=741) (actual time=0.217..1,091.467 rows=100 loops=1)

  • Join Filter: (groupmeasure.measureunitmultiplier_id = measureunitmultiplier.id)
4. 0.473 1,090.760 ↑ 782.2 100 1

Nested Loop Left Join (cost=1.29..216,972.68 rows=78,221 width=719) (actual time=0.209..1,090.760 rows=100 loops=1)

  • Join Filter: (regroupingunit.id = regroupingunitdescription.regroupingunit_id)
5. 0.141 1,090.187 ↑ 782.2 100 1

Hash Left Join (cost=1.29..215,798.20 rows=78,221 width=219) (actual time=0.192..1,090.187 rows=100 loops=1)

  • Hash Cond: (groupmeasure.regroupingunit_id = regroupingunit.id)
6. 0.207 1,090.038 ↑ 782.2 100 1

Nested Loop (cost=0.00..215,305.57 rows=78,221 width=219) (actual time=0.176..1,090.038 rows=100 loops=1)

7. 0.207 1,089.331 ↑ 782.2 100 1

Nested Loop (cost=0.00..193,260.05 rows=78,221 width=267) (actual time=0.172..1,089.331 rows=100 loops=1)

8. 0.193 1,088.324 ↑ 782.2 100 1

Nested Loop (cost=0.00..171,218.88 rows=78,221 width=251) (actual time=0.119..1,088.324 rows=100 loops=1)

9. 0.379 1,087.431 ↑ 782.2 100 1

Nested Loop (cost=0.00..149,278.07 rows=78,221 width=224) (actual time=0.116..1,087.431 rows=100 loops=1)

10. 0.284 1,085.252 ↑ 782.2 100 1

Nested Loop (cost=0.00..126,949.35 rows=78,221 width=174) (actual time=0.110..1,085.252 rows=100 loops=1)

11. 0.097 687.480 ↑ 475.8 56 1

Nested Loop (cost=0.00..107,467.77 rows=26,647 width=105) (actual time=0.101..687.480 rows=56 loops=1)

12. 0.056 530.219 ↑ 743.2 28 1

Nested Loop (cost=0.00..88,848.75 rows=20,810 width=73) (actual time=0.094..530.219 rows=28 loops=1)

13. 0.068 529.687 ↑ 743.2 28 1

Nested Loop (cost=0.00..82,842.29 rows=20,810 width=105) (actual time=0.081..529.687 rows=28 loops=1)

14. 0.086 529.395 ↑ 743.2 28 1

Nested Loop (cost=0.00..76,893.81 rows=20,810 width=78) (actual time=0.077..529.395 rows=28 loops=1)

15. 0.096 529.141 ↑ 809.5 28 1

Nested Loop (cost=0.00..70,529.52 rows=22,666 width=84) (actual time=0.074..529.141 rows=28 loops=1)

16. 0.095 397.025 ↑ 809.5 28 1

Nested Loop (cost=0.00..60,065.20 rows=22,666 width=116) (actual time=0.067..397.025 rows=28 loops=1)

17. 0.050 284.622 ↑ 809.5 28 1

Nested Loop (cost=0.00..49,969.49 rows=22,666 width=93) (actual time=0.060..284.622 rows=28 loops=1)

18. 0.023 0.736 ↑ 1,182.0 21 1

Nested Loop (cost=0.00..30,418.36 rows=24,821 width=45) (actual time=0.053..0.736 rows=21 loops=1)

19. 0.017 0.623 ↑ 1,027.4 9 1

Nested Loop (cost=0.00..20,146.76 rows=9,247 width=73) (actual time=0.047..0.623 rows=9 loops=1)

20. 0.033 0.237 ↑ 1,027.4 9 1

Nested Loop (cost=0.00..17,509.30 rows=9,247 width=72) (actual time=0.042..0.237 rows=9 loops=1)

21. 0.047 0.120 ↑ 2,467.8 14 1

Merge Join (cost=0.00..6,966.48 rows=34,549 width=56) (actual time=0.021..0.120 rows=14 loops=1)

  • Merge Cond: (document.id = st.id)
22. 0.023 0.023 ↑ 2,744.7 17 1

Index Scan using document_pkey on document (cost=0.00..4,634.90 rows=46,660 width=24) (actual time=0.010..0.023 rows=17 loops=1)

23. 0.050 0.050 ↑ 2,467.8 14 1

Index Scan using pk__saletransaction__5d6bc808 on saletransaction st (cost=0.00..1,783.07 rows=34,549 width=32) (actual time=0.006..0.050 rows=14 loops=1)

24. 0.084 0.084 ↑ 1.0 1 14

Index Scan using pk__orders__086b34a6 on orders (cost=0.00..0.29 rows=1 width=16) (actual time=0.005..0.006 rows=1 loops=14)

  • Index Cond: (orders.id = document.id)
25. 0.369 0.369 ↑ 1.0 1 9

Index Scan using pk__commercialentity__4a8310c6 on commercialentity (cost=0.00..0.27 rows=1 width=33) (actual time=0.040..0.041 rows=1 loops=9)

  • Index Cond: (commercialentity.id = st.customer_id)
26. 0.090 0.090 ↑ 3.0 2 9

Index Scan using saletra_details_x on saletransactiondetail std (cost=0.00..1.04 rows=6 width=36) (actual time=0.007..0.010 rows=2 loops=9)

  • Index Cond: (std.saletransaction_id = document.id)
27. 283.836 283.836 ↑ 5.0 1 21

Index Scan using explodableite_workord_x on workorder parentwo (cost=0.00..0.73 rows=5 width=48) (actual time=13.513..13.516 rows=1 loops=21)

  • Index Cond: (parentwo.explodableitem_id = std.id)
28. 112.308 112.308 ↑ 1.0 1 28

Index Scan using pk__transactiondetai__583cfe97 on transactiondetail td (cost=0.00..0.43 rows=1 width=23) (actual time=4.010..4.011 rows=1 loops=28)

  • Index Cond: (td.id = std.id)
29. 132.020 132.020 ↑ 1.0 1 28

Index Scan using explodableitem_pkey on explodableitem exploditem (cost=0.00..0.45 rows=1 width=32) (actual time=4.714..4.715 rows=1 loops=28)

  • Index Cond: (exploditem.id = std.id)
30. 0.168 0.168 ↑ 1.0 1 28

Index Scan using productquicklibrary_pkey on productquicklibrary productqcode (cost=0.00..0.27 rows=1 width=26) (actual time=0.005..0.006 rows=1 loops=28)

  • Index Cond: (productqcode.id = exploditem.productquicklibrary_id)
31. 0.224 0.224 ↑ 1.0 1 28

Index Scan using product_pkey on product (cost=0.00..0.27 rows=1 width=27) (actual time=0.007..0.008 rows=1 loops=28)

  • Index Cond: (public.product.id = parentwo.fabricationproduct_id)
32. 0.476 0.476 ↑ 1.0 1 28

Index Scan using uq__productdescripti__26bab19c on productdescription (cost=0.00..0.28 rows=1 width=16) (actual time=0.016..0.017 rows=1 loops=28)

  • Index Cond: ((public.productdescription.product_id = public.product.id) AND ((public.productdescription.languagecode)::text = 'en'::text))
33. 157.164 157.164 ↑ 1.0 2 28

Index Scan using workord_routing_x on workorderroutingstep wors (cost=0.00..0.87 rows=2 width=48) (actual time=5.611..5.613 rows=2 loops=28)

  • Index Cond: (wors.workorder_id = parentwo.id)
34. 397.488 397.488 ↑ 2.5 2 56

Index Scan using workordrouste_workorddet_x on workorderdetail wod (cost=0.00..0.67 rows=5 width=101) (actual time=5.614..7.098 rows=2 loops=56)

  • Index Cond: (wod.workorderroutingstep_id = wors.id)
35. 1.800 1.800 ↑ 1.0 1 100

Index Scan using uq__productdescripti__26bab19c on productdescription (cost=0.00..0.27 rows=1 width=50) (actual time=0.017..0.018 rows=1 loops=100)

  • Index Cond: ((public.productdescription.product_id = wod.inventoryproduct_id) AND ((public.productdescription.languagecode)::text = 'en'::text))
36. 0.700 0.700 ↑ 1.0 1 100

Index Scan using product_pkey on product (cost=0.00..0.27 rows=1 width=27) (actual time=0.006..0.007 rows=1 loops=100)

  • Index Cond: (public.product.id = public.productdescription.product_id)
37. 0.800 0.800 ↑ 1.0 1 100

Index Scan using groupmeasure_pkey on groupmeasure (cost=0.00..0.27 rows=1 width=48) (actual time=0.007..0.008 rows=1 loops=100)

  • Index Cond: (groupmeasure.id = wod.quantitygroupmeasure_id)
38. 0.500 0.500 ↑ 1.0 1 100

Index Scan using product_pkey on product (cost=0.00..0.27 rows=1 width=16) (actual time=0.003..0.005 rows=1 loops=100)

  • Index Cond: (public.product.id = public.product.id)
39. 0.006 0.008 ↑ 1.0 13 1

Hash (cost=1.13..1.13 rows=13 width=16) (actual time=0.008..0.008 rows=13 loops=1)

  • Buckets: 1024 Batches: 1 Memory Usage: 1kB
40. 0.002 0.002 ↑ 1.0 13 1

Seq Scan on regroupingunit (cost=0.00..1.13 rows=13 width=16) (actual time=0.002..0.002 rows=13 loops=1)

41. 0.092 0.100 ↓ 13.0 13 100

Materialize (cost=0.00..1.17 rows=1 width=532) (actual time=0.000..0.001 rows=13 loops=100)

42. 0.008 0.008 ↓ 13.0 13 1

Seq Scan on regroupingunitdescription (cost=0.00..1.16 rows=1 width=532) (actual time=0.003..0.008 rows=13 loops=1)

  • Filter: ((languagecode)::text = 'en'::text)
43. 0.195 0.200 ↑ 1.0 13 100

Materialize (cost=0.00..1.19 rows=13 width=54) (actual time=0.000..0.002 rows=13 loops=100)

44. 0.005 0.005 ↑ 1.0 13 1

Seq Scan on measureunitmultiplier (cost=0.00..1.13 rows=13 width=54) (actual time=0.001..0.005 rows=13 loops=1)

45. 0.100 0.100 ↓ 0.0 0 100

Index Scan using productionbatch_pkey on productionbatch pb (cost=0.00..0.27 rows=1 width=25) (actual time=0.001..0.001 rows=0 loops=100)

  • Index Cond: (pb.id = wors.productionbatch_id)