explain.depesz.com

PostgreSQL's explain analyze made readable

Result: 7rQeE : Optimized task list

Settings
# exclusive inclusive rows x rows loops node
1. 0.017 5.610 ↑ 501.6 44 1

Unique (cost=27,604.22..32,239.34 rows=22,072 width=2,133) (actual time=5.585..5.610 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.125 5.587 ↑ 501.6 44 1

Sort (cost=27,602.43..27,657.61 rows=22,072 width=2,133) (actual time=5.585..5.587 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.036 5.462 ↑ 501.6 44 1

Hash Left Join (cost=4,377.21..5,639.94 rows=22,072 width=2,133) (actual time=5.397..5.462 rows=44 loops=1)

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

Hash Left Join (cost=4,308.57..5,147.57 rows=14,765 width=1,884) (actual time=4.348..4.385 rows=26 loops=1)

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

Hash Join (cost=4,307.15..5,087.90 rows=14,765 width=828) (actual time=4.325..4.352 rows=26 loops=1)

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

Hash Right Join (cost=4,301.42..5,026.81 rows=14,765 width=828) (actual time=4.254..4.270 rows=28 loops=1)

  • Hash Cond: (comments8_.action_id = actions1_.id)
9. 1.281 1.281 ↑ 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.281 rows=16,490 loops=1)

10. 0.017 1.812 ↑ 17.4 28 1

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

  • Buckets: 1024 Batches: 1 Memory Usage: 17kB
11. 0.020 1.795 ↑ 17.4 28 1

Hash Left Join (cost=41.43..4,295.32 rows=488 width=692) (actual time=0.699..1.795 rows=28 loops=1)

  • Hash Cond: (actions1_.id = tags9_.action_id)
12. 0.017 1.709 ↑ 17.4 28 1

Hash Left Join (cost=34.39..4,286.40 rows=488 width=523) (actual time=0.625..1.709 rows=28 loops=1)

  • Hash Cond: (taskentity0_.id = comments2_.task_id)
13. 0.020 1.604 ↑ 17.4 28 1

Hash Left Join (cost=24.26..4,265.37 rows=488 width=398) (actual time=0.528..1.604 rows=28 loops=1)

  • Hash Cond: (taskentity0_.id = actions1_.task_id)
14. 0.217 1.193 ↑ 27.1 18 1

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

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

SubPlan (forSeq Scan)

16. 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
17. 0.149 0.391 ↑ 1.0 545 1

Hash (cost=17.45..17.45 rows=545 width=149) (actual time=0.391..0.391 rows=545 loops=1)

  • Buckets: 1024 Batches: 1 Memory Usage: 108kB
18. 0.242 0.242 ↑ 1.0 545 1

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

19. 0.050 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
20. 0.038 0.038 ↑ 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.038 rows=228 loops=1)

21. 0.004 0.066 ↑ 1.0 6 1

Hash (cost=6.96..6.96 rows=6 width=169) (actual time=0.066..0.066 rows=6 loops=1)

  • Buckets: 1024 Batches: 1 Memory Usage: 9kB
22. 0.010 0.062 ↑ 1.0 6 1

Hash Right Join (cost=5.09..6.96 rows=6 width=169) (actual time=0.060..0.062 rows=6 loops=1)

  • Hash Cond: (children12_.parent_id = taskmanage10_.id)
23. 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)

24. 0.004 0.048 ↑ 1.0 6 1

Hash (cost=5.01..5.01 rows=6 width=118) (actual time=0.048..0.048 rows=6 loops=1)

  • Buckets: 1024 Batches: 1 Memory Usage: 9kB
25. 0.012 0.044 ↑ 1.0 6 1

Hash Right Join (cost=3.14..5.01 rows=6 width=118) (actual time=0.042..0.044 rows=6 loops=1)

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

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

27. 0.004 0.027 ↑ 1.0 6 1

Hash (cost=3.06..3.06 rows=6 width=67) (actual time=0.027..0.027 rows=6 loops=1)

  • Buckets: 1024 Batches: 1 Memory Usage: 9kB
28. 0.015 0.023 ↑ 1.0 6 1

Hash Right Join (cost=1.14..3.06 rows=6 width=67) (actual time=0.019..0.023 rows=6 loops=1)

  • Hash Cond: (taskmanage10_.id = tags9_.tag_id)
29. 0.004 0.004 ↑ 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.004 rows=63 loops=1)

30. 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
31. 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.001..0.002 rows=6 loops=1)

32. 0.003 0.064 ↑ 1.0 8 1

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

  • Buckets: 1024 Batches: 1 Memory Usage: 9kB
33. 0.003 0.061 ↑ 1.0 8 1

HashAggregate (cost=5.55..5.63 rows=8 width=8) (actual time=0.060..0.061 rows=8 loops=1)

  • Group Key: project16_.business_id
34. 0.027 0.058 ↑ 1.0 8 1

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

  • Hash Cond: (projectmem15_.project_id = project16_.id)
35. 0.015 0.015 ↑ 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.015 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.350 1.041 ↑ 1.0 1,459 1

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

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

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

  • Hash Cond: (tags4_.tag_id = taskmanage5_.id)
42. 0.098 0.098 ↑ 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.098 rows=1,459 loops=1)

43. 0.015 0.083 ↑ 1.0 63 1

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

  • Buckets: 1024 Batches: 1 Memory Usage: 14kB
44. 0.020 0.068 ↑ 1.0 63 1

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

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

Hash Right Join (cost=2.42..4.29 rows=63 width=102) (actual time=0.029..0.041 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.008 0.014 ↑ 1.0 63 1

Hash (cost=1.63..1.63 rows=63 width=51) (actual time=0.014..0.014 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)