explain.depesz.com

PostgreSQL's explain analyze made readable

Result: cLlQ

Settings
# exclusive inclusive rows x rows loops node
1. 0.001 137.574 ↓ 0.0 0 1

Nested Loop Left Join (cost=121,923.18..121,970.12 rows=2 width=1,216) (actual time=137.574..137.574 rows=0 loops=1)

2. 0.002 137.573 ↓ 0.0 0 1

Nested Loop Left Join (cost=121,921.66..121,966.21 rows=1 width=1,121) (actual time=137.573..137.573 rows=0 loops=1)

3. 0.002 137.571 ↓ 0.0 0 1

Nested Loop Left Join (cost=121,921.24..121,957.77 rows=1 width=1,094) (actual time=137.571..137.571 rows=0 loops=1)

4. 0.002 137.569 ↓ 0.0 0 1

Nested Loop Left Join (cost=121,920.82..121,956.91 rows=1 width=1,063) (actual time=137.569..137.569 rows=0 loops=1)

5. 0.002 137.567 ↓ 0.0 0 1

Nested Loop Left Join (cost=121,920.68..121,948.74 rows=1 width=1,032) (actual time=137.567..137.567 rows=0 loops=1)

6. 0.002 137.565 ↓ 0.0 0 1

Nested Loop (cost=121,920.26..121,940.30 rows=1 width=1,001) (actual time=137.565..137.565 rows=0 loops=1)

7. 0.003 137.563 ↓ 0.0 0 1

Nested Loop Left Join (cost=121,919.97..121,931.98 rows=1 width=972) (actual time=137.563..137.563 rows=0 loops=1)

8. 0.003 137.560 ↓ 0.0 0 1

Nested Loop (cost=121,919.55..121,923.53 rows=1 width=941) (actual time=137.560..137.560 rows=0 loops=1)

9. 0.002 137.557 ↓ 0.0 0 1

Nested Loop Left Join (cost=121,919.26..121,922.81 rows=1 width=910) (actual time=137.557..137.557 rows=0 loops=1)

10. 0.016 137.555 ↓ 0.0 0 1

Hash Right Join (cost=121,919.12..121,922.65 rows=1 width=764) (actual time=137.555..137.555 rows=0 loops=1)

  • Hash Cond: ((ec.expensesclauseid)::integer = (o.expensesclauseid)::integer)
11. 0.000 0.000 ↓ 0.0 0

Seq Scan on expensesclauses ec (cost=0.00..3.10 rows=110 width=68) (never executed)

12. 0.003 137.539 ↓ 0.0 0 1

Hash (cost=121,919.11..121,919.11 rows=1 width=700) (actual time=137.539..137.539 rows=0 loops=1)

  • Buckets: 1024 Batches: 1 Memory Usage: 8kB
13. 0.018 137.536 ↓ 0.0 0 1

Hash Join (cost=121,918.06..121,919.11 rows=1 width=700) (actual time=137.536..137.536 rows=0 loops=1)

  • Hash Cond: ((oc.currencyid)::integer = (o.currencyid)::integer)
14. 0.007 0.007 ↑ 3.0 1 1

Seq Scan on currencies oc (cost=0.00..1.03 rows=3 width=200) (actual time=0.007..0.007 rows=1 loops=1)

15. 0.002 137.511 ↓ 0.0 0 1

Hash (cost=121,918.05..121,918.05 rows=1 width=504) (actual time=137.511..137.511 rows=0 loops=1)

  • Buckets: 1024 Batches: 1 Memory Usage: 8kB
16. 0.002 137.509 ↓ 0.0 0 1

Nested Loop Left Join (cost=121,882.59..121,918.05 rows=1 width=504) (actual time=137.509..137.509 rows=0 loops=1)

17. 0.002 137.507 ↓ 0.0 0 1

Nested Loop Left Join (cost=121,882.45..121,917.88 rows=1 width=358) (actual time=137.507..137.507 rows=0 loops=1)

18. 0.002 137.505 ↓ 0.0 0 1

Nested Loop Left Join (cost=121,882.03..121,909.43 rows=1 width=336) (actual time=137.505..137.505 rows=0 loops=1)

19. 0.003 137.503 ↓ 0.0 0 1

Nested Loop Left Join (cost=121,881.89..121,909.27 rows=1 width=190) (actual time=137.503..137.503 rows=0 loops=1)

20. 0.006 137.500 ↓ 0.0 0 1

Nested Loop (cost=121,881.47..121,900.82 rows=1 width=190) (actual time=137.500..137.500 rows=0 loops=1)

21. 0.002 137.494 ↓ 0.0 0 1

Nested Loop (cost=121,881.04..121,892.36 rows=1 width=186) (actual time=137.494..137.494 rows=0 loops=1)

22. 0.017 137.492 ↓ 0.0 0 1

Hash Join (cost=121,880.75..121,884.04 rows=1 width=170) (actual time=137.492..137.492 rows=0 loops=1)

  • Hash Cond: ((oos.stateid)::integer = (o.stateid)::integer)
23. 0.005 0.005 ↑ 93.0 1 1

Seq Scan on states oos (cost=0.00..2.93 rows=93 width=31) (actual time=0.005..0.005 rows=1 loops=1)

24. 0.002 137.470 ↓ 0.0 0 1

Hash (cost=121,880.74..121,880.74 rows=1 width=147) (actual time=137.470..137.470 rows=0 loops=1)

  • Buckets: 1024 Batches: 1 Memory Usage: 8kB
25. 0.310 137.468 ↓ 0.0 0 1

Index Scan using i_orders_orderidobjectstatusid on orders o (cost=121,872.72..121,880.74 rows=1 width=147) (actual time=137.468..137.468 rows=0 loops=1)

  • Index Cond: ((orderid)::integer = 2892634)
  • Filter: (isinwork AND (parentorderid IS NULL) AND (hashed SubPlan 1))
  • Rows Removed by Filter: 1
26.          

SubPlan (forIndex Scan)

27. 0.030 137.158 ↓ 78.0 858 1

Nested Loop (cost=22,091.74..121,872.26 rows=11 width=4) (actual time=132.172..137.158 rows=858 loops=1)

28. 0.804 133.696 ↑ 3.7 858 1

Hash Join (cost=22,091.18..98,751.50 rows=3,143 width=8) (actual time=132.107..133.696 rows=858 loops=1)

  • Hash Cond: ((oir.orderid)::integer = (o_1.orderid)::integer)
29. 1.256 1.256 ↑ 174.2 969 1

Index Scan using i_orderitemreserves_4_samples on orderitemreserves oir (cost=0.28..75,996.07 rows=168,828 width=8) (actual time=0.010..1.256 rows=969 loops=1)

  • Filter: ((storegroupid)::integer = 10)
  • Rows Removed by Filter: 405
30. 50.736 131.636 ↓ 3.6 192,982 1

Hash (cost=21,419.04..21,419.04 rows=53,749 width=4) (actual time=131.636..131.636 rows=192,982 loops=1)

  • Buckets: 262144 (originally 65536) Batches: 1 (originally 1) Memory Usage: 8833kB
31. 80.900 80.900 ↓ 3.6 192,982 1

Index Only Scan using i_orders_samples_isinwork on orders o_1 (cost=0.42..21,419.04 rows=53,749 width=4) (actual time=0.029..80.900 rows=192,982 loops=1)

  • Heap Fetches: 34558
32. 3.432 3.432 ↑ 1.0 1 858

Index Scan using i_orderitems_orderitemidobjectstatusid on orderitems oi (cost=0.56..7.35 rows=1 width=4) (actual time=0.004..0.004 rows=1 loops=858)

  • Index Cond: ((orderitemid)::integer = (oir.orderitemid)::integer)
  • Filter: (COALESCE(amountgiven, 0) = 0)
33. 0.000 0.000 ↓ 0.0 0

Index Scan using customers_pkey on customers ccu (cost=0.29..8.31 rows=1 width=16) (never executed)

  • Index Cond: ((customerid)::integer = (o.customerid)::integer)
34. 0.000 0.000 ↓ 0.0 0

Index Scan using i_suborder_order on suborders so (cost=0.43..8.45 rows=1 width=8) (never executed)

  • Index Cond: ((orderid)::integer = 2892634)
  • Filter: ((objectstatusid <= 1) AND ((pickupstoreid)::integer = 62))
35. 0.000 0.000 ↓ 0.0 0

Index Scan using contracts_pkey on contracts cso (cost=0.42..8.44 rows=1 width=8) (never executed)

  • Index Cond: ((contractid)::integer = (so.contractid)::integer)
36. 0.000 0.000 ↓ 0.0 0

Index Scan using contracttypes_pkey on contracttypes csot (cost=0.14..0.16 rows=1 width=150) (never executed)

  • Index Cond: ((contracttypeid)::integer = (cso.contracttypeid)::integer)
37. 0.000 0.000 ↓ 0.0 0

Index Scan using contracts_pkey on contracts co (cost=0.42..8.44 rows=1 width=26) (never executed)

  • Index Cond: ((contractid)::integer = (o.contractid)::integer)
38. 0.000 0.000 ↓ 0.0 0

Index Scan using contracttypes_pkey on contracttypes ct (cost=0.14..0.16 rows=1 width=150) (never executed)

  • Index Cond: ((contracttypeid)::integer = (co.contracttypeid)::integer)
39. 0.000 0.000 ↓ 0.0 0

Index Scan using contractpaymenttypes_pkey on contractpaymenttypes cpt (cost=0.13..0.15 rows=1 width=150) (never executed)

  • Index Cond: ((contractpaymenttypeid)::integer = (co.contractpaymenttypeid)::integer)
40. 0.000 0.000 ↓ 0.0 0

Index Scan using companies_pkey on companies cc (cost=0.29..0.71 rows=1 width=39) (never executed)

  • Index Cond: ((companyid)::integer = (ccu.customerid)::integer)
41. 0.000 0.000 ↓ 0.0 0

Index Scan using persons_pkey on persons jpcc (cost=0.42..8.44 rows=1 width=35) (never executed)

  • Index Cond: ((personid)::integer = (o.customerjpid)::integer)
42. 0.000 0.000 ↓ 0.0 0

Index Scan using companies_pkey on companies sc (cost=0.29..8.31 rows=1 width=33) (never executed)

  • Index Cond: ((companyid)::integer = (o.supplierid)::integer)
43. 0.000 0.000 ↓ 0.0 0

Index Scan using persons_pkey on persons jpsc (cost=0.42..8.44 rows=1 width=35) (never executed)

  • Index Cond: ((personid)::integer = (o.supplierjpid)::integer)
44. 0.000 0.000 ↓ 0.0 0

Index Scan using i_persons_role_10 on persons frc (cost=0.14..8.16 rows=1 width=35) (never executed)

  • Index Cond: ((personid)::integer = (o.frcid)::integer)
45. 0.000 0.000 ↓ 0.0 0

Index Scan using persons_pkey on persons sm (cost=0.42..0.85 rows=1 width=35) (never executed)

  • Index Cond: ((personid)::integer = ccu.salesid)
46. 0.000 0.000 ↓ 0.0 0

Index Scan using persons_pkey on persons sp (cost=0.42..8.44 rows=1 width=35) (never executed)

  • Index Cond: ((personid)::integer = (o.ownpersonid)::integer)
47. 0.000 0.000 ↓ 0.0 0

Hash Right Join (cost=1.53..3.87 rows=2 width=36) (never executed)

  • Hash Cond: ((srp_1.salerankid)::integer = (sr.salerankid)::integer)
48. 0.000 0.000 ↓ 0.0 0

Hash Join (cost=1.36..3.56 rows=32 width=15) (never executed)

  • Hash Cond: ((srp_1.contractcompanyid)::integer = (cc_1.contractcompanyid)::integer)
49. 0.000 0.000 ↓ 0.0 0

Seq Scan on salerankparams srp_1 (cost=0.00..1.64 rows=64 width=19) (never executed)

50. 0.000 0.000 ↓ 0.0 0

Hash (cost=1.22..1.22 rows=11 width=4) (never executed)

51. 0.000 0.000 ↓ 0.0 0

Seq Scan on contractcompanies cc_1 (cost=0.00..1.22 rows=11 width=4) (never executed)

  • Filter: isdefault
52. 0.000 0.000 ↓ 0.0 0

Hash (cost=0.16..0.16 rows=1 width=150) (never executed)

53. 0.000 0.000 ↓ 0.0 0

Index Scan using saleranks_pkey on saleranks sr (cost=0.14..0.16 rows=1 width=150) (never executed)

  • Index Cond: ((salerankid)::integer = (ccu.salerankid)::integer)
Planning time : 22.865 ms
Execution time : 138.968 ms