explain.depesz.com

PostgreSQL's explain analyze made readable

Result: slQ4 : Optimized task list

Settings
# exclusive inclusive rows x rows loops node
1. 0.019 5.515 ↑ 501.6 44 1

Unique (cost=27,602.73..32,237.85 rows=22,072 width=2,133) (actual time=5.489..5.515 rows=44 loops=1)

2.          

Initplan (forUnique)

3. 0.006 0.006 ↑ 1.0 1 1

Seq Scan on task_mgt_tag taskmanage13_ (cost=0.00..1.79 rows=1 width=8) (actual time=0.003..0.006 rows=1 loops=1)

  • Filter: ((label)::text = 'ARCHIVED'::text)
  • Rows Removed by Filter: 62
4. 0.110 5.490 ↑ 501.6 44 1

Sort (cost=27,600.95..27,656.13 rows=22,072 width=2,133) (actual time=5.488..5.490 rows=44 loops=1)

  • Sort Key: taskentity0_.id, actions1_.business_id, comments8_.creation_date, comments2_.creation_date, actions1_.id, comments8_.id, taskmanage10_.id, taskmanage11_.id, children12_.id, comments2_.id, checklisti3_.id, taskmanage5_.id, taskmanage6_.id, (...)
  • Sort Method: quicksort Memory: 48kB
5. 0.038 5.380 ↑ 501.6 44 1

Hash Left Join (cost=4,375.72..5,638.46 rows=22,072 width=2,133) (actual time=5.313..5.380 rows=44 loops=1)

  • Hash Cond: (taskentity0_.id = tags4_.task_id)
6. 0.022 4.222 ↑ 567.9 26 1

Hash Left Join (cost=4,307.09..5,146.09 rows=14,765 width=1,884) (actual time=4.184..4.222 rows=26 loops=1)

  • Hash Cond: (taskentity0_.id = checklisti3_.task_id)
7. 0.019 4.189 ↑ 567.9 26 1

Hash Join (cost=4,305.66..5,086.42 rows=14,765 width=828) (actual time=4.161..4.189 rows=26 loops=1)

  • Hash Cond: (taskentity0_.project_business_id = project16_.business_id)
8. 1.200 4.126 ↑ 527.3 28 1

Hash Right Join (cost=4,299.94..5,025.33 rows=14,765 width=828) (actual time=4.110..4.126 rows=28 loops=1)

  • Hash Cond: (comments8_.action_id = actions1_.id)
9. 1.194 1.194 ↑ 1.0 16,490 1

Seq Scan on task_mgt_action_comment comments8_ (cost=0.00..515.90 rows=16,490 width=136) (actual time=0.002..1.194 rows=16,490 loops=1)

10. 0.016 1.732 ↑ 17.4 28 1

Hash (cost=4,293.84..4,293.84 rows=488 width=692) (actual time=1.732..1.732 rows=28 loops=1)

  • Buckets: 1024 Batches: 1 Memory Usage: 17kB
11. 0.017 1.716 ↑ 17.4 28 1

Hash Left Join (cost=4,262.81..4,293.84 rows=488 width=692) (actual time=1.453..1.716 rows=28 loops=1)

  • Hash Cond: (tags9_.tag_id = taskmanage10_.id)
12. 0.054 1.612 ↑ 17.4 28 1

Hash Right Join (cost=4,255.07..4,279.38 rows=488 width=539) (actual time=1.360..1.612 rows=28 loops=1)

  • Hash Cond: (actions1_.task_id = taskentity0_.id)
13. 0.202 0.252 ↓ 1.0 546 1

Hash Left Join (cost=1.14..20.69 rows=545 width=165) (actual time=0.017..0.252 rows=546 loops=1)

  • Hash Cond: (actions1_.id = tags9_.action_id)
14. 0.046 0.046 ↑ 1.0 545 1

Seq Scan on task_mgt_action actions1_ (cost=0.00..17.45 rows=545 width=149) (actual time=0.002..0.046 rows=545 loops=1)

15. 0.002 0.004 ↑ 1.0 6 1

Hash (cost=1.06..1.06 rows=6 width=16) (actual time=0.004..0.004 rows=6 loops=1)

  • Buckets: 1024 Batches: 1 Memory Usage: 9kB
16. 0.002 0.002 ↑ 1.0 6 1

Seq Scan on task_mgt_tag_to_action tags9_ (cost=0.00..1.06 rows=6 width=16) (actual time=0.002..0.002 rows=6 loops=1)

17. 0.011 1.306 ↑ 27.1 18 1

Hash (cost=4,247.83..4,247.83 rows=488 width=374) (actual time=1.306..1.306 rows=18 loops=1)

  • Buckets: 1024 Batches: 1 Memory Usage: 13kB
18. 0.016 1.295 ↑ 27.1 18 1

Hash Left Join (cost=10.13..4,247.83 rows=488 width=374) (actual time=0.209..1.295 rows=18 loops=1)

  • Hash Cond: (taskentity0_.id = comments2_.task_id)
19. 0.215 1.191 ↑ 27.1 18 1

Seq Scan on task_mgt_task taskentity0_ (cost=0.00..4,226.80 rows=488 width=249) (actual time=0.114..1.191 rows=18 loops=1)

  • Filter: (NOT (SubPlan 2))
  • Rows Removed by Filter: 958
20.          

SubPlan (forSeq Scan)

21. 0.976 0.976 ↑ 1.0 1 976

Index Only Scan using task_mgt_tag_to_task_pk on task_mgt_tag_to_task tags14_ (cost=0.28..8.29 rows=1 width=8) (actual time=0.001..0.001 rows=1 loops=976)

  • Index Cond: (task_id = taskentity0_.id)
  • Heap Fetches: 1204
22. 0.049 0.088 ↑ 1.0 228 1

Hash (cost=7.28..7.28 rows=228 width=125) (actual time=0.088..0.088 rows=228 loops=1)

  • Buckets: 1024 Batches: 1 Memory Usage: 45kB
23. 0.039 0.039 ↑ 1.0 228 1

Seq Scan on task_mgt_task_comment comments2_ (cost=0.00..7.28 rows=228 width=125) (actual time=0.003..0.039 rows=228 loops=1)

24. 0.017 0.087 ↑ 1.0 63 1

Hash (cost=6.96..6.96 rows=63 width=153) (actual time=0.087..0.087 rows=63 loops=1)

  • Buckets: 1024 Batches: 1 Memory Usage: 14kB
25. 0.020 0.070 ↑ 1.0 63 1

Hash Left Join (cost=4.83..6.96 rows=63 width=153) (actual time=0.044..0.070 rows=63 loops=1)

  • Hash Cond: (taskmanage10_.id = children12_.parent_id)
26. 0.023 0.043 ↑ 1.0 63 1

Hash Right Join (cost=2.42..4.29 rows=63 width=102) (actual time=0.031..0.043 rows=63 loops=1)

  • Hash Cond: (taskmanage11_.id = taskmanage10_.parent_id)
27. 0.004 0.004 ↑ 1.0 63 1

Seq Scan on task_mgt_tag taskmanage11_ (cost=0.00..1.63 rows=63 width=51) (actual time=0.001..0.004 rows=63 loops=1)

28. 0.011 0.016 ↑ 1.0 63 1

Hash (cost=1.63..1.63 rows=63 width=51) (actual time=0.016..0.016 rows=63 loops=1)

  • Buckets: 1024 Batches: 1 Memory Usage: 13kB
29. 0.005 0.005 ↑ 1.0 63 1

Seq Scan on task_mgt_tag taskmanage10_ (cost=0.00..1.63 rows=63 width=51) (actual time=0.002..0.005 rows=63 loops=1)

30. 0.003 0.007 ↓ 0.0 0 1

Hash (cost=1.63..1.63 rows=63 width=51) (actual time=0.007..0.007 rows=0 loops=1)

  • Buckets: 1024 Batches: 1 Memory Usage: 8kB
31. 0.004 0.004 ↑ 1.0 63 1

Seq Scan on task_mgt_tag children12_ (cost=0.00..1.63 rows=63 width=51) (actual time=0.001..0.004 rows=63 loops=1)

32. 0.002 0.044 ↑ 1.0 8 1

Hash (cost=5.63..5.63 rows=8 width=8) (actual time=0.044..0.044 rows=8 loops=1)

  • Buckets: 1024 Batches: 1 Memory Usage: 9kB
33. 0.004 0.042 ↑ 1.0 8 1

HashAggregate (cost=5.55..5.63 rows=8 width=8) (actual time=0.041..0.042 rows=8 loops=1)

  • Group Key: project16_.business_id
34. 0.008 0.038 ↑ 1.0 8 1

Hash Join (cost=2.12..5.53 rows=8 width=8) (actual time=0.029..0.038 rows=8 loops=1)

  • Hash Cond: (projectmem15_.project_id = project16_.id)
35. 0.014 0.014 ↑ 1.0 8 1

Seq Scan on task_mgt_project_member projectmem15_ (cost=0.00..3.30 rows=8 width=8) (actual time=0.007..0.014 rows=8 loops=1)

  • Filter: ((user_id)::text = 'b976d6f8-a036-4898-84ef-b6e33ac4dd98'::text)
  • Rows Removed by Filter: 96
36. 0.009 0.016 ↑ 1.0 50 1

Hash (cost=1.50..1.50 rows=50 width=16) (actual time=0.016..0.016 rows=50 loops=1)

  • Buckets: 1024 Batches: 1 Memory Usage: 11kB
37. 0.007 0.007 ↑ 1.0 50 1

Seq Scan on task_mgt_project project16_ (cost=0.00..1.50 rows=50 width=16) (actual time=0.002..0.007 rows=50 loops=1)

38. 0.006 0.011 ↑ 1.0 19 1

Hash (cost=1.19..1.19 rows=19 width=1,056) (actual time=0.011..0.011 rows=19 loops=1)

  • Buckets: 1024 Batches: 1 Memory Usage: 10kB
39. 0.005 0.005 ↑ 1.0 19 1

Seq Scan on task_mgt_checklist_item checklisti3_ (cost=0.00..1.19 rows=19 width=1,056) (actual time=0.003..0.005 rows=19 loops=1)

40. 0.383 1.120 ↑ 1.0 1,459 1

Hash (cost=50.40..50.40 rows=1,459 width=169) (actual time=1.120..1.120 rows=1,459 loops=1)

  • Buckets: 2048 Batches: 1 Memory Usage: 153kB
41. 0.521 0.737 ↑ 1.0 1,459 1

Hash Left Join (cost=7.74..50.40 rows=1,459 width=169) (actual time=0.098..0.737 rows=1,459 loops=1)

  • Hash Cond: (tags4_.tag_id = taskmanage5_.id)
42. 0.129 0.129 ↑ 1.0 1,459 1

Seq Scan on task_mgt_tag_to_task tags4_ (cost=0.00..22.59 rows=1,459 width=16) (actual time=0.003..0.129 rows=1,459 loops=1)

43. 0.015 0.087 ↑ 1.0 63 1

Hash (cost=6.96..6.96 rows=63 width=153) (actual time=0.087..0.087 rows=63 loops=1)

  • Buckets: 1024 Batches: 1 Memory Usage: 14kB
44. 0.022 0.072 ↑ 1.0 63 1

Hash Left Join (cost=4.83..6.96 rows=63 width=153) (actual time=0.046..0.072 rows=63 loops=1)

  • Hash Cond: (taskmanage5_.id = children7_.parent_id)
45. 0.022 0.043 ↑ 1.0 63 1

Hash Right Join (cost=2.42..4.29 rows=63 width=102) (actual time=0.032..0.043 rows=63 loops=1)

  • Hash Cond: (taskmanage6_.id = taskmanage5_.parent_id)
46. 0.004 0.004 ↑ 1.0 63 1

Seq Scan on task_mgt_tag taskmanage6_ (cost=0.00..1.63 rows=63 width=51) (actual time=0.001..0.004 rows=63 loops=1)

47. 0.011 0.017 ↑ 1.0 63 1

Hash (cost=1.63..1.63 rows=63 width=51) (actual time=0.017..0.017 rows=63 loops=1)

  • Buckets: 1024 Batches: 1 Memory Usage: 13kB
48. 0.006 0.006 ↑ 1.0 63 1

Seq Scan on task_mgt_tag taskmanage5_ (cost=0.00..1.63 rows=63 width=51) (actual time=0.002..0.006 rows=63 loops=1)

49. 0.003 0.007 ↓ 0.0 0 1

Hash (cost=1.63..1.63 rows=63 width=51) (actual time=0.007..0.007 rows=0 loops=1)

  • Buckets: 1024 Batches: 1 Memory Usage: 8kB
50. 0.004 0.004 ↑ 1.0 63 1

Seq Scan on task_mgt_tag children7_ (cost=0.00..1.63 rows=63 width=51) (actual time=0.001..0.004 rows=63 loops=1)