explain.depesz.com

PostgreSQL's explain analyze made readable

Result: 4eRL

Settings
# exclusive inclusive rows x rows loops node
1. 0.062 1.069 ↑ 1.0 2 1

Nested Loop Left Join (cost=61.69..429.63 rows=2 width=1,517) (actual time=0.773..1.069 rows=2 loops=1)

2. 0.009 0.585 ↑ 1.0 2 1

Hash Left Join (cost=33.29..123.14 rows=2 width=1,173) (actual time=0.483..0.585 rows=2 loops=1)

  • Hash Cond: ((t.taskflowdefid)::text = (startloop.startnode)::text)
3. 0.007 0.547 ↑ 1.0 2 1

Nested Loop Left Join (cost=29.56..119.38 rows=2 width=1,173) (actual time=0.447..0.547 rows=2 loops=1)

4. 0.010 0.536 ↑ 1.0 2 1

Hash Left Join (cost=28.59..100.73 rows=2 width=739) (actual time=0.439..0.536 rows=2 loops=1)

  • Hash Cond: ((t.taskflowdefid)::text = (endloop.endnode)::text)
5. 0.006 0.486 ↑ 1.0 2 1

Nested Loop (cost=24.86..96.97 rows=2 width=703) (actual time=0.390..0.486 rows=2 loops=1)

6. 0.008 0.444 ↑ 1.0 2 1

Nested Loop Left Join (cost=24.44..80.11 rows=2 width=685) (actual time=0.365..0.444 rows=2 loops=1)

7. 0.008 0.380 ↑ 1.0 2 1

Nested Loop (cost=16.00..63.16 rows=2 width=677) (actual time=0.327..0.380 rows=2 loops=1)

8. 0.007 0.328 ↑ 1.0 2 1

Nested Loop (cost=15.58..46.28 rows=2 width=620) (actual time=0.299..0.328 rows=2 loops=1)

9. 0.008 0.307 ↑ 1.0 2 1

Nested Loop (cost=15.43..45.93 rows=2 width=627) (actual time=0.287..0.307 rows=2 loops=1)

10. 0.111 0.271 ↑ 1.0 2 1

Hash Right Join (cost=15.16..29.33 rows=2 width=588) (actual time=0.265..0.271 rows=2 loops=1)

  • Hash Cond: ((sc.taskflowdefid)::text = (t.taskflowdefid)::text)
11. 0.085 0.085 ↑ 1.1 440 1

Seq Scan on subprojectdefs sc (cost=0.00..12.89 rows=489 width=80) (actual time=0.009..0.085 rows=440 loops=1)

12. 0.009 0.075 ↑ 1.0 2 1

Hash (cost=15.13..15.13 rows=2 width=526) (actual time=0.074..0.075 rows=2 loops=1)

  • Buckets: 1,024 Batches: 1 Memory Usage: 9kB
13. 0.066 0.066 ↑ 1.0 2 1

Index Scan using taskflowdefs_pkey on taskflowdefs t (cost=0.42..15.13 rows=2 width=526) (actual time=0.044..0.066 rows=2 loops=1)

  • Index Cond: ((taskflowdefid)::text = ANY ('{TF1565649787Xc5nF,TF1565649787Vg2eU}'::text[]))
14. 0.028 0.028 ↑ 1.0 1 2

Index Scan using task_pkey on task tk (cost=0.28..8.29 rows=1 width=57) (actual time=0.014..0.014 rows=1 loops=2)

  • Index Cond: ((taskid)::text = (t.taskid)::text)
15. 0.014 0.014 ↑ 1.0 1 2

Index Scan using groupareas_pkey on groupareas g (cost=0.14..0.18 rows=1 width=29) (actual time=0.007..0.007 rows=1 loops=2)

  • Index Cond: ((groupid)::text = (tk.groupid)::text)
16. 0.044 0.044 ↑ 1.0 1 2

Index Scan using taskdata_pkey on taskdata (cost=0.42..8.44 rows=1 width=57) (actual time=0.022..0.022 rows=1 loops=2)

  • Index Cond: ((taskdataid)::text = (t.taskdataid)::text)
17. 0.008 0.056 ↑ 1.0 1 2

Aggregate (cost=8.44..8.45 rows=1 width=8) (actual time=0.028..0.028 rows=1 loops=2)

18. 0.048 0.048 ↑ 1.0 1 2

Index Scan using taskdata_taskflowdefid_idx on taskdata taskdata_1 (cost=0.42..8.44 rows=1 width=8) (actual time=0.023..0.024 rows=1 loops=2)

  • Index Cond: ((taskflowdefid)::text = (t.taskflowdefid)::text)
19. 0.036 0.036 ↑ 1.0 1 2

Index Scan using instance_pkey on instance i (cost=0.41..8.43 rows=1 width=36) (actual time=0.018..0.018 rows=1 loops=2)

  • Index Cond: ((instanceid)::text = (t.instanceid)::text)
20. 0.012 0.040 ↑ 1.8 32 1

Hash (cost=3.02..3.02 rows=57 width=36) (actual time=0.040..0.040 rows=32 loops=1)

  • Buckets: 1,024 Batches: 1 Memory Usage: 11kB
21. 0.028 0.028 ↑ 1.8 32 1

Seq Scan on redoloop endloop (cost=0.00..3.02 rows=57 width=36) (actual time=0.011..0.028 rows=32 loops=1)

  • Filter: (active IS TRUE)
  • Rows Removed by Filter: 24
22. 0.000 0.004 ↓ 0.0 0 2

Nested Loop (cost=0.96..9.31 rows=1 width=451) (actual time=0.002..0.002 rows=0 loops=2)

23. 0.002 0.004 ↓ 0.0 0 2

Nested Loop (cost=0.83..9.16 rows=1 width=457) (actual time=0.002..0.002 rows=0 loops=2)

24. 0.002 0.002 ↓ 0.0 0 2

Index Scan using project_pkey on project sp (cost=0.41..6.26 rows=1 width=441) (actual time=0.001..0.001 rows=0 loops=2)

  • Index Cond: ((projectid)::text = (sc.subprojectid)::text)
25. 0.000 0.000 ↓ 0.0 0

Index Scan using instance_projectid_idx on instance spi (cost=0.41..2.89 rows=1 width=34) (never executed)

  • Index Cond: ((projectid)::text = (sp.projectid)::text)
26. 0.000 0.000 ↓ 0.0 0

Index Scan using projecttypes_pkey on projecttypes spt (cost=0.14..0.15 rows=1 width=30) (never executed)

  • Index Cond: ((projecttypeid)::text = (sp.projecttypeid)::text)
27. 0.010 0.029 ↑ 1.8 32 1

Hash (cost=3.02..3.02 rows=57 width=18) (actual time=0.029..0.029 rows=32 loops=1)

  • Buckets: 1,024 Batches: 1 Memory Usage: 10kB
28. 0.019 0.019 ↑ 1.8 32 1

Seq Scan on redoloop startloop (cost=0.00..3.02 rows=57 width=18) (actual time=0.006..0.019 rows=32 loops=1)

  • Filter: (active IS TRUE)
  • Rows Removed by Filter: 24
29. 0.002 0.422 ↓ 0.0 0 2

Limit (cost=28.40..28.40 rows=1 width=16) (actual time=0.211..0.211 rows=0 loops=2)

30. 0.010 0.420 ↓ 0.0 0 2

Sort (cost=28.40..28.40 rows=1 width=16) (actual time=0.210..0.210 rows=0 loops=2)

  • Sort Key: h.starttime DESC
  • Sort Method: quicksort Memory: 25kB
31. 0.410 0.410 ↓ 0.0 0 2

Seq Scan on onhold h (cost=0.00..28.39 rows=1 width=16) (actual time=0.205..0.205 rows=0 loops=2)

  • Filter: ((endtime IS NULL) AND ((taskflowdefid)::text = (t.taskflowdefid)::text))
  • Rows Removed by Filter: 602
32.          

SubPlan (for Nested Loop Left Join)

33. 0.000 0.000 ↓ 0.0 0

Aggregate (cost=55.38..55.39 rows=1 width=32) (never executed)

34. 0.000 0.000 ↓ 0.0 0

Nested Loop (cost=1.25..55.36 rows=4 width=75) (never executed)

35. 0.000 0.000 ↓ 0.0 0

Nested Loop (cost=0.84..50.77 rows=4 width=18) (never executed)

36. 0.000 0.000 ↓ 0.0 0

Nested Loop (cost=0.42..47.87 rows=4 width=18) (never executed)

37. 0.000 0.000 ↓ 0.0 0

Seq Scan on subprojectdefs (cost=0.00..14.11 rows=4 width=18) (never executed)

  • Filter: ((subprojectid)::text = (sc.subprojectid)::text)
38. 0.000 0.000 ↓ 0.0 0

Index Scan using taskflowdefs_pkey on taskflowdefs t_1 (cost=0.42..8.44 rows=1 width=36) (never executed)

  • Index Cond: ((taskflowdefid)::text = (subprojectdefs.taskflowdefid)::text)
39. 0.000 0.000 ↓ 0.0 0

Index Scan using instance_pkey on instance i_1 (cost=0.41..0.72 rows=1 width=36) (never executed)

  • Index Cond: ((instanceid)::text = (t_1.instanceid)::text)
40. 0.000 0.000 ↓ 0.0 0

Index Scan using project_pkey on project p (cost=0.41..1.15 rows=1 width=75) (never executed)

  • Index Cond: ((projectid)::text = (i_1.projectid)::text)
41. 0.000 0.000 ↓ 0.0 0

Aggregate (cost=69.08..69.09 rows=1 width=8) (never executed)

42. 0.000 0.000 ↓ 0.0 0

Merge Right Join (cost=61.02..66.58 rows=1,000 width=0) (never executed)

  • Merge Cond: (holidays.holiday = i_2.i)
  • Filter: ((date_part('dow'::text, i_2.i) = ANY ('{0,6}'::double precision[])) OR (holidays.holiday IS NOT NULL))
43. 0.000 0.000 ↓ 0.0 0

Sort (cost=1.17..1.19 rows=7 width=4) (never executed)

  • Sort Key: holidays.holiday
44. 0.000 0.000 ↓ 0.0 0

Seq Scan on holidays (cost=0.00..1.07 rows=7 width=4) (never executed)

45. 0.000 0.000 ↓ 0.0 0

Sort (cost=59.86..62.36 rows=1,000 width=8) (never executed)

  • Sort Key: i_2.i
46. 0.000 0.000 ↓ 0.0 0

Function Scan on generate_series i_2 (cost=0.03..10.03 rows=1,000 width=8) (never executed)