explain.depesz.com

PostgreSQL's explain analyze made readable

Result: i6yH

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

Nested Loop Left Join (cost=132,195.74..132,242.69 rows=2 width=1,216) (actual time=125.790..125.790 rows=0 loops=1)

2. 0.000 125.789 ↓ 0.0 0 1

Nested Loop Left Join (cost=132,194.22..132,238.78 rows=1 width=1,121) (actual time=125.789..125.789 rows=0 loops=1)

3. 0.000 125.789 ↓ 0.0 0 1

Nested Loop Left Join (cost=132,193.80..132,230.33 rows=1 width=1,094) (actual time=125.789..125.789 rows=0 loops=1)

4. 0.002 125.789 ↓ 0.0 0 1

Nested Loop Left Join (cost=132,193.38..132,229.47 rows=1 width=1,063) (actual time=125.789..125.789 rows=0 loops=1)

5. 0.000 125.787 ↓ 0.0 0 1

Nested Loop Left Join (cost=132,193.24..132,221.31 rows=1 width=1,032) (actual time=125.787..125.787 rows=0 loops=1)

6. 0.001 125.787 ↓ 0.0 0 1

Nested Loop (cost=132,192.82..132,212.86 rows=1 width=1,001) (actual time=125.787..125.787 rows=0 loops=1)

7. 0.000 125.786 ↓ 0.0 0 1

Nested Loop Left Join (cost=132,192.53..132,204.54 rows=1 width=972) (actual time=125.786..125.786 rows=0 loops=1)

8. 0.000 125.786 ↓ 0.0 0 1

Nested Loop (cost=132,192.11..132,196.09 rows=1 width=941) (actual time=125.786..125.786 rows=0 loops=1)

9. 0.000 125.786 ↓ 0.0 0 1

Nested Loop Left Join (cost=132,191.82..132,195.37 rows=1 width=910) (actual time=125.786..125.786 rows=0 loops=1)

10. 0.019 125.786 ↓ 0.0 0 1

Hash Right Join (cost=132,191.69..132,195.21 rows=1 width=764) (actual time=125.786..125.786 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.000 125.767 ↓ 0.0 0 1

Hash (cost=132,191.67..132,191.67 rows=1 width=700) (actual time=125.767..125.767 rows=0 loops=1)

  • Buckets: 1024 Batches: 1 Memory Usage: 8kB
13. 0.011 125.767 ↓ 0.0 0 1

Hash Join (cost=132,190.62..132,191.67 rows=1 width=700) (actual time=125.767..125.767 rows=0 loops=1)

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

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

15. 0.000 125.748 ↓ 0.0 0 1

Hash (cost=132,190.61..132,190.61 rows=1 width=504) (actual time=125.748..125.748 rows=0 loops=1)

  • Buckets: 1024 Batches: 1 Memory Usage: 8kB
16. 0.001 125.748 ↓ 0.0 0 1

Nested Loop Left Join (cost=132,155.15..132,190.61 rows=1 width=504) (actual time=125.748..125.748 rows=0 loops=1)

17. 0.000 125.747 ↓ 0.0 0 1

Nested Loop Left Join (cost=132,155.01..132,190.44 rows=1 width=358) (actual time=125.747..125.747 rows=0 loops=1)

18. 0.000 125.747 ↓ 0.0 0 1

Nested Loop Left Join (cost=132,154.59..132,182.00 rows=1 width=336) (actual time=125.747..125.747 rows=0 loops=1)

19. 0.001 125.747 ↓ 0.0 0 1

Nested Loop Left Join (cost=132,154.46..132,181.83 rows=1 width=190) (actual time=125.747..125.747 rows=0 loops=1)

20. 0.000 125.746 ↓ 0.0 0 1

Nested Loop (cost=132,154.04..132,173.38 rows=1 width=190) (actual time=125.746..125.746 rows=0 loops=1)

21. 0.001 125.746 ↓ 0.0 0 1

Nested Loop (cost=132,153.61..132,164.92 rows=1 width=186) (actual time=125.746..125.746 rows=0 loops=1)

22. 0.011 125.745 ↓ 0.0 0 1

Hash Join (cost=132,153.32..132,156.60 rows=1 width=170) (actual time=125.745..125.745 rows=0 loops=1)

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

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

24. 0.000 125.730 ↓ 0.0 0 1

Hash (cost=132,153.30..132,153.30 rows=1 width=147) (actual time=125.730..125.730 rows=0 loops=1)

  • Buckets: 1024 Batches: 1 Memory Usage: 8kB
25. 0.297 125.730 ↓ 0.0 0 1

Index Scan using i_orders_orderidobjectstatusid on orders o (cost=132,145.28..132,153.30 rows=1 width=147) (actual time=125.730..125.730 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.000 125.433 ↓ 58.9 824 1

Nested Loop (cost=26,558.69..132,144.82 rows=14 width=4) (actual time=120.874..125.433 rows=824 loops=1)

28. 1.115 122.313 ↑ 4.8 824 1

Hash Join (cost=26,558.13..103,219.78 rows=3,932 width=8) (actual time=120.856..122.313 rows=824 loops=1)

  • Hash Cond: ((oir.orderid)::integer = (o_1.orderid)::integer)
29. 1.136 1.136 ↑ 180.4 936 1

Index Scan using i_orderitemreserves_4_samples on orderitemreserves oir (cost=0.28..75,989.55 rows=168,815 width=8) (actual time=0.009..1.136 rows=936 loops=1)

  • Filter: ((storegroupid)::integer = 10)
  • Rows Removed by Filter: 437
30. 43.777 120.062 ↓ 2.9 192,965 1

Hash (cost=25,717.47..25,717.47 rows=67,231 width=4) (actual time=120.062..120.062 rows=192,965 loops=1)

  • Buckets: 262144 (originally 131072) Batches: 1 (originally 1) Memory Usage: 8832kB
31. 76.285 76.285 ↓ 2.9 192,965 1

Index Only Scan using i_orders_samples_isinwork on orders o_1 (cost=0.42..25,717.47 rows=67,231 width=4) (actual time=0.092..76.285 rows=192,965 loops=1)

  • Heap Fetches: 34120
32. 3.296 3.296 ↑ 1.0 1 824

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

  • 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 : 19.159 ms
Execution time : 126.929 ms