explain.depesz.com

PostgreSQL's explain analyze made readable

Result: SUZo

Settings
# exclusive inclusive rows x rows loops node
1. 0.266 9,391.712 ↓ 53.0 53 1

Sort (cost=5,746.91..5,746.92 rows=1 width=60) (actual time=9,391.709..9,391.712 rows=53 loops=1)

  • Sort Key: statuses.orderindex, items.priority, items.assignee_orderindex
  • Sort Method: quicksort Memory: 32kB
2. 0.197 9,391.446 ↓ 53.0 53 1

Nested Loop (cost=309.52..5,746.90 rows=1 width=60) (actual time=22.081..9,391.446 rows=53 loops=1)

3. 0.160 9,390.454 ↓ 53.0 53 1

Nested Loop (cost=309.23..5,746.54 rows=1 width=76) (actual time=22.055..9,390.454 rows=53 loops=1)

  • Join Filter: ((project_members.userid IS NOT NULL) OR ((team_members.role <> 4) AND (NOT projects.private)))
4. 0.141 9,389.605 ↓ 53.0 53 1

Nested Loop Left Join (cost=308.95..5,744.03 rows=1 width=81) (actual time=22.036..9,389.605 rows=53 loops=1)

5. 280.362 9,389.146 ↓ 53.0 53 1

Nested Loop (cost=308.67..5,743.10 rows=1 width=85) (actual time=22.019..9,389.146 rows=53 loops=1)

  • Join Filter: (items.id = cf_daf46ad2_9aba_494d_b876_ff588d7bdedd.item_id)
  • Rows Removed by Join Filter: 1753081
6. 1.370 1.370 ↓ 53.0 53 1

Index Scan using field_values_pkey on field_values cf_daf46ad2_9aba_494d_b876_ff588d7bdedd (cost=0.29..248.52 rows=1 width=4) (actual time=0.162..1.370 rows=53 loops=1)

  • Index Cond: (field_id = 'daf46ad2-9aba-494d-b876-ff588d7bdedd'::uuid)
  • Filter: (((value ->> 'value'::text))::uuid = '6477c66f-2c62-4593-8fa6-93ee64a6ad27'::uuid)
7. 644.840 9,107.414 ↓ 7.2 33,078 53

Hash Left Join (cost=308.39..5,437.48 rows=4,568 width=85) (actual time=0.173..171.838 rows=33,078 loops=53)

  • Hash Cond: (COALESCE(items.parent, items.id) = task_members.task_id)
  • Filter: ((task_members.userid IS NOT NULL) OR ((NOT items.private) AND (items.parent IS NULL)) OR (NOT parent.private))
  • Rows Removed by Filter: 69
8. 1,176.388 8,462.563 ↓ 7.3 33,147 53

Nested Loop Left Join (cost=305.82..5,406.20 rows=4,568 width=91) (actual time=0.172..159.671 rows=33,147 loops=53)

9. 275.335 3,772.593 ↓ 7.3 33,147 53

Nested Loop (cost=305.82..2,125.71 rows=4,568 width=90) (actual time=0.170..71.181 rows=33,147 loops=53)

10. 30.779 37.948 ↓ 3.5 1,070 53

Hash Right Join (cost=305.82..317.10 rows=304 width=35) (actual time=0.163..0.716 rows=1,070 loops=53)

  • Hash Cond: (subcategory_members.subcategory = subcategories.id)
  • Filter: ((subcategory_members.userid IS NOT NULL) OR (NOT subcategories.private))
  • Rows Removed by Filter: 8
11. 4.346 4.346 ↑ 1.1 330 53

Index Only Scan using subcategory_members_userid_subcategory on subcategory_members (cost=0.28..10.11 rows=373 width=12) (actual time=0.017..0.082 rows=330 loops=53)

  • Index Cond: (userid = 53577)
  • Heap Fetches: 9487
12. 0.332 2.823 ↓ 3.5 1,078 1

Hash (cost=301.74..301.74 rows=304 width=36) (actual time=2.823..2.823 rows=1,078 loops=1)

  • Buckets: 1024 Batches: 1 Memory Usage: 77kB
13. 0.233 2.491 ↓ 3.5 1,078 1

Nested Loop (cost=4.49..301.74 rows=304 width=36) (actual time=0.082..2.491 rows=1,078 loops=1)

14. 0.097 0.763 ↓ 2.2 299 1

Hash Left Join (cost=4.20..243.43 rows=137 width=25) (actual time=0.075..0.763 rows=299 loops=1)

  • Hash Cond: (categories.id = category_members.category)
  • Filter: ((category_members.userid IS NOT NULL) OR (NOT categories.private))
  • Rows Removed by Filter: 6
15. 0.077 0.640 ↓ 2.2 305 1

Nested Loop (cost=2.20..237.48 rows=137 width=26) (actual time=0.034..0.640 rows=305 loops=1)

16. 0.095 0.115 ↑ 1.0 64 1

Bitmap Heap Scan on projects (cost=1.91..68.15 rows=67 width=17) (actual time=0.027..0.115 rows=64 loops=1)

  • Recheck Cond: (team = 333)
  • Filter: ((NOT template) AND (NOT deleted))
  • Rows Removed by Filter: 5
  • Heap Blocks: exact=39
17. 0.020 0.020 ↑ 1.0 69 1

Bitmap Index Scan on projects_team_idx (cost=0.00..1.90 rows=69 width=0) (actual time=0.020..0.020 rows=69 loops=1)

  • Index Cond: (team = 333)
18. 0.448 0.448 ↓ 2.5 5 64

Index Scan using categories_project_idx on categories (cost=0.29..2.51 rows=2 width=17) (actual time=0.003..0.007 rows=5 loops=64)

  • Index Cond: (project_id = projects.id)
  • Filter: ((NOT template) AND (NOT deleted))
  • Rows Removed by Filter: 0
19. 0.006 0.026 ↑ 1.1 20 1

Hash (cost=1.74..1.74 rows=21 width=12) (actual time=0.026..0.026 rows=20 loops=1)

  • Buckets: 1024 Batches: 1 Memory Usage: 1kB
20. 0.020 0.020 ↑ 1.1 20 1

Index Only Scan using category_members_userid_category on category_members (cost=0.28..1.74 rows=21 width=12) (actual time=0.009..0.020 rows=20 loops=1)

  • Index Cond: (userid = 53577)
  • Heap Fetches: 20
21. 1.495 1.495 ↓ 2.0 4 299

Index Scan using subcategories_cat_idx on subcategories (cost=0.29..0.41 rows=2 width=27) (actual time=0.002..0.005 rows=4 loops=299)

  • Index Cond: (category = categories.id)
  • Filter: ((NOT template) AND (NOT deleted))
  • Rows Removed by Filter: 0
22. 226.840 3,459.310 ↑ 1.5 31 56,710

Append (cost=0.00..5.50 rows=45 width=72) (actual time=0.006..0.061 rows=31 loops=56,710)

23. 0.000 0.000 ↓ 0.0 0 56,710

Seq Scan on items (cost=0.00..0.00 rows=1 width=464) (actual time=0.000..0.000 rows=0 loops=56,710)

  • Filter: ((NOT template) AND (NOT deleted) AND (subcategories.id = subcategory))
24. 3,232.470 3,232.470 ↑ 1.4 31 56,710

Index Scan using tasks_subategory_index on tasks (cost=0.42..5.50 rows=44 width=63) (actual time=0.005..0.057 rows=31 loops=56,710)

  • Index Cond: (subcategory = subcategories.id)
  • Filter: ((NOT template) AND (NOT deleted))
  • Rows Removed by Filter: 0
25. 0.000 3,513.582 ↓ 0.0 0 1,756,791

Append (cost=0.00..0.70 rows=2 width=19) (actual time=0.002..0.002 rows=0 loops=1,756,791)

26. 0.000 0.000 ↓ 0.0 0 1,756,791

Seq Scan on items parent (cost=0.00..0.00 rows=1 width=33) (actual time=0.000..0.000 rows=0 loops=1,756,791)

  • Filter: (items.parent = id)
27. 3,513.582 3,513.582 ↓ 0.0 0 1,756,791

Index Scan using tasks_id_idx on tasks parent_1 (cost=0.42..0.70 rows=1 width=5) (actual time=0.001..0.002 rows=0 loops=1,756,791)

  • Index Cond: (items.parent = id)
28. 0.002 0.011 ↓ 2.0 6 1

Hash (cost=2.53..2.53 rows=3 width=8) (actual time=0.011..0.011 rows=6 loops=1)

  • Buckets: 1024 Batches: 1 Memory Usage: 1kB
29. 0.009 0.009 ↓ 2.0 6 1

Index Only Scan using task_members_userid_task_id on task_members (cost=0.28..2.53 rows=3 width=8) (actual time=0.006..0.009 rows=6 loops=1)

  • Index Cond: (userid = 53577)
  • Heap Fetches: 5
30. 0.318 0.318 ↓ 0.0 0 53

Index Only Scan using project_members_pkey on project_members (cost=0.28..0.92 rows=1 width=12) (actual time=0.006..0.006 rows=0 loops=53)

  • Index Cond: ((project_id = projects.id) AND (userid = 53577))
  • Heap Fetches: 0
31. 0.689 0.689 ↑ 1.0 1 53

Index Scan using team_members_pkey on team_members (cost=0.28..2.50 rows=1 width=12) (actual time=0.011..0.013 rows=1 loops=53)

  • Index Cond: ((team_id = 333) AND (userid = 53577))
32. 0.795 0.795 ↑ 1.0 1 53

Index Scan using status_group_idx on statuses (cost=0.29..0.35 rows=1 width=44) (actual time=0.015..0.015 rows=1 loops=53)

  • Index Cond: ((status_group = subcategories.status_group) AND (status = (items.status)::text))
  • Filter: ((type <> 'closed'::text) AND (items.status_id = id))
Planning time : 5.826 ms
Execution time : 9,392.043 ms