explain.depesz.com

PostgreSQL's explain analyze made readable

Result: 9jOT

Settings
# exclusive inclusive rows x rows loops node
1. 10,209.618 10,216.367 ↑ 1.0 10 1

Subquery Scan on a (cost=3.43..700.10 rows=10 width=872) (actual time=5,130.485..10,216.367 rows=10 loops=1)

2. 0.028 6.749 ↑ 1.0 10 1

Limit (cost=3.43..697.43 rows=10 width=840) (actual time=1.226..6.749 rows=10 loops=1)

3. 0.221 6.721 ↑ 303.0 10 1

Nested Loop Left Join (cost=3.43..210,284.35 rows=3,030 width=840) (actual time=1.225..6.721 rows=10 loops=1)

  • Join Filter: (t.taxiorderid = w1.taxiorder_id)
  • Rows Removed by Join Filter: 280
4. 0.078 2.070 ↑ 303.0 10 1

Nested Loop Left Join (cost=3.43..44,084.42 rows=3,030 width=810) (actual time=0.293..2.070 rows=10 loops=1)

  • Join Filter: (r.reasonid = ol.reasonid)
  • Rows Removed by Join Filter: 202
5. 0.066 1.942 ↑ 303.0 10 1

Nested Loop Left Join (cost=3.43..43,044.42 rows=3,030 width=696) (actual time=0.266..1.942 rows=10 loops=1)

6. 0.056 1.766 ↑ 303.0 10 1

Nested Loop (cost=3.14..37,446.05 rows=3,030 width=692) (actual time=0.245..1.766 rows=10 loops=1)

  • Join Filter: (t.ordertypeid = ordertype.ordertypeid)
7. 0.047 1.700 ↑ 303.0 10 1

Nested Loop (cost=3.14..37,248.03 rows=3,030 width=574) (actual time=0.236..1.700 rows=10 loops=1)

  • Join Filter: (t.autoclassid = autoclass.autoclassid)
8. 0.039 1.633 ↑ 303.0 10 1

Nested Loop (cost=3.14..37,133.37 rows=3,030 width=516) (actual time=0.224..1.633 rows=10 loops=1)

  • Join Filter: (t.autotypeid = autotype.autotypeid)
9. 0.072 1.574 ↑ 303.0 10 1

Nested Loop Left Join (cost=3.14..36,935.36 rows=3,030 width=398) (actual time=0.207..1.574 rows=10 loops=1)

10. 0.043 1.452 ↑ 303.0 10 1

Nested Loop (cost=2.86..35,959.63 rows=3,030 width=394) (actual time=0.190..1.452 rows=10 loops=1)

  • Join Filter: (t.orderstatusid = orderstatus.orderstatusid)
  • Rows Removed by Join Filter: 39
11. 0.065 1.359 ↑ 303.0 10 1

Nested Loop (cost=2.86..35,585.87 rows=3,030 width=276) (actual time=0.169..1.359 rows=10 loops=1)

12. 0.070 1.264 ↑ 303.0 10 1

Nested Loop (cost=2.57..34,568.11 rows=3,030 width=260) (actual time=0.158..1.264 rows=10 loops=1)

13. 0.065 1.134 ↑ 303.0 10 1

Nested Loop (cost=2.28..33,550.35 rows=3,030 width=244) (actual time=0.144..1.134 rows=10 loops=1)

14. 0.070 1.039 ↑ 303.0 10 1

Nested Loop (cost=1.99..32,596.17 rows=3,030 width=233) (actual time=0.130..1.039 rows=10 loops=1)

15. 0.065 0.909 ↑ 303.0 10 1

Nested Loop (cost=1.70..31,641.99 rows=3,030 width=222) (actual time=0.114..0.909 rows=10 loops=1)

16. 0.084 0.804 ↑ 303.0 10 1

Nested Loop (cost=1.28..18,924.79 rows=3,030 width=219) (actual time=0.098..0.804 rows=10 loops=1)

17. 0.060 0.630 ↑ 303.0 10 1

Nested Loop Left Join (cost=0.85..6,207.59 rows=3,030 width=216) (actual time=0.078..0.630 rows=10 loops=1)

18. 0.102 0.430 ↑ 303.0 10 1

Nested Loop Left Join (cost=0.57..5,159.13 rows=3,030 width=177) (actual time=0.050..0.430 rows=10 loops=1)

19. 0.208 0.208 ↑ 303.0 10 1

Index Scan Backward using order_createdon on taxiorder t (cost=0.29..3,038.13 rows=3,030 width=145) (actual time=0.028..0.208 rows=10 loops=1)

  • Filter: ((clientaccountid = 2407) AND (orderstatusid <> ALL ('{1,5,6}'::integer[])))
  • Rows Removed by Filter: 98
20. 0.120 0.120 ↑ 1.0 1 10

Index Scan using account_accountid on account a_1 (cost=0.28..0.70 rows=1 width=32) (actual time=0.012..0.012 rows=1 loops=10)

  • Index Cond: (accountid = t.accountid)
21. 0.140 0.140 ↑ 1.0 1 10

Index Only Scan using auto_accountidisactiveautoidautobrandautomodelyearstatenumberco on auto au (cost=0.28..0.34 rows=1 width=47) (actual time=0.011..0.014 rows=1 loops=10)

  • Index Cond: ((accountid = a_1.accountid) AND (isactive = true))
  • Filter: isactive
  • Heap Fetches: 3
22. 0.090 0.090 ↑ 1.0 1 10

Index Scan using house_houseid on house fromhouse (cost=0.42..4.20 rows=1 width=11) (actual time=0.009..0.009 rows=1 loops=10)

  • Index Cond: (houseid = t.fromhouseid)
23. 0.040 0.040 ↑ 1.0 1 10

Index Scan using house_houseid on house tohouse (cost=0.42..4.20 rows=1 width=11) (actual time=0.004..0.004 rows=1 loops=10)

  • Index Cond: (houseid = t.tohouseid)
24. 0.060 0.060 ↑ 1.0 1 10

Index Scan using street_streetid on street fromstreet (cost=0.29..0.31 rows=1 width=19) (actual time=0.006..0.006 rows=1 loops=10)

  • Index Cond: (streetid = fromhouse.streetid)
25. 0.030 0.030 ↑ 1.0 1 10

Index Scan using street_streetid on street tostreet (cost=0.29..0.31 rows=1 width=19) (actual time=0.003..0.003 rows=1 loops=10)

  • Index Cond: (streetid = tohouse.streetid)
26. 0.060 0.060 ↑ 1.0 1 10

Index Scan using locality_localityid on locality fromlocality (cost=0.29..0.34 rows=1 width=24) (actual time=0.006..0.006 rows=1 loops=10)

  • Index Cond: (localityid = fromstreet.localityid)
27. 0.030 0.030 ↑ 1.0 1 10

Index Scan using locality_localityid on locality tolocality (cost=0.29..0.34 rows=1 width=24) (actual time=0.003..0.003 rows=1 loops=10)

  • Index Cond: (localityid = tostreet.localityid)
28. 0.033 0.050 ↑ 1.8 5 10

Materialize (cost=0.00..1.14 rows=9 width=122) (actual time=0.003..0.005 rows=5 loops=10)

29. 0.017 0.017 ↑ 1.5 6 1

Seq Scan on orderstatus (cost=0.00..1.09 rows=9 width=122) (actual time=0.009..0.017 rows=6 loops=1)

30. 0.050 0.050 ↓ 0.0 0 10

Index Only Scan using scores_orderidvalue on scores (cost=0.28..0.31 rows=1 width=8) (actual time=0.005..0.005 rows=0 loops=10)

  • Index Cond: (taxiorderid = t.taxiorderid)
  • Heap Fetches: 0
31. 0.015 0.020 ↑ 5.0 1 10

Materialize (cost=0.00..1.07 rows=5 width=122) (actual time=0.002..0.002 rows=1 loops=10)

32. 0.005 0.005 ↑ 5.0 1 1

Seq Scan on autotype (cost=0.00..1.05 rows=5 width=122) (actual time=0.005..0.005 rows=1 loops=1)

33. 0.016 0.020 ↑ 3.0 1 10

Materialize (cost=0.00..1.04 rows=3 width=62) (actual time=0.002..0.002 rows=1 loops=10)

34. 0.004 0.004 ↑ 3.0 1 1

Seq Scan on autoclass (cost=0.00..1.03 rows=3 width=62) (actual time=0.004..0.004 rows=1 loops=1)

35. 0.006 0.010 ↑ 5.0 1 10

Materialize (cost=0.00..1.07 rows=5 width=122) (actual time=0.001..0.001 rows=1 loops=10)

36. 0.004 0.004 ↑ 5.0 1 1

Seq Scan on ordertype (cost=0.00..1.05 rows=5 width=122) (actual time=0.004..0.004 rows=1 loops=1)

37. 0.110 0.110 ↓ 0.0 0 10

Index Scan using orderlog_orderid on orderlog ol (cost=0.29..1.84 rows=1 width=8) (actual time=0.010..0.011 rows=0 loops=10)

  • Index Cond: (taxiorderid = t.taxiorderid)
  • Filter: (orderstatusid = 8)
  • Rows Removed by Filter: 3
38. 0.039 0.050 ↑ 1.1 20 10

Materialize (cost=0.00..1.34 rows=23 width=122) (actual time=0.002..0.005 rows=20 loops=10)

39. 0.011 0.011 ↑ 1.0 23 1

Seq Scan on reason r (cost=0.00..1.23 rows=23 width=122) (actual time=0.005..0.011 rows=23 loops=1)

40. 0.039 0.530 ↑ 2.1 28 10

Materialize (cost=0.00..118.20 rows=59 width=9) (actual time=0.002..0.053 rows=28 loops=10)

41. 0.491 0.491 ↑ 2.1 28 1

Seq Scan on log_w1 w1 (cost=0.00..117.91 rows=59 width=9) (actual time=0.008..0.491 rows=28 loops=1)

  • Filter: (((level)::text = 'Success'::text) AND ((event_type)::text = 'TaxiorderPayment'::text))
  • Rows Removed by Filter: 1508
42.          

SubPlan (forNested Loop Left Join)

43. 0.070 3.900 ↑ 1.0 2 10

Append (cost=0.00..53.92 rows=2 width=4) (actual time=0.225..0.390 rows=2 loops=10)

44. 2.270 2.270 ↑ 1.0 1 10

Seq Scan on picture (cost=0.00..26.95 rows=1 width=4) (actual time=0.205..0.227 rows=1 loops=10)

  • Filter: (((NOT isdoc) OR (isdoc IS NULL)) AND (promo_id IS NULL) AND (accountid = t.accountid))
  • Rows Removed by Filter: 1357
45. 1.560 1.560 ↑ 1.0 1 10

Seq Scan on picture picture_1 (cost=0.00..26.95 rows=1 width=4) (actual time=0.150..0.156 rows=1 loops=10)

  • Filter: (autoid = au.autoid)
  • Rows Removed by Filter: 1357
Planning time : 82.683 ms