explain.depesz.com

PostgreSQL's explain analyze made readable

Result: Cruq

Settings
# exclusive inclusive rows x rows loops node
1. 0.139 1,226.287 ↓ 60.5 121 1

Nested Loop Semi Join (cost=12,619.25..24,994.15 rows=2 width=524) (actual time=128.464..1,226.287 rows=121 loops=1)

  • Join Filter: (projects.id = collaborators_3.project_id)
2. 0.156 1,221.066 ↓ 60.5 121 1

Nested Loop Semi Join (cost=12,618.68..24,975.87 rows=2 width=528) (actual time=128.383..1,221.066 rows=121 loops=1)

3. 0.341 1,220.124 ↓ 65.5 131 1

Nested Loop Semi Join (cost=12,618.11..24,942.62 rows=2 width=524) (actual time=128.360..1,220.124 rows=131 loops=1)

4. 1.179 1,217.556 ↓ 65.5 131 1

Hash Semi Join (cost=12,617.49..24,941.60 rows=2 width=532) (actual time=128.291..1,217.556 rows=131 loops=1)

  • Hash Cond: ((COALESCE(profiles_4.id, steps.profile_id, selected_profiles.id)) = collaborators.profile_id)
5. 0.816 1,215.511 ↓ 2,738.0 5,476 1

Append (cost=12,583.06..24,907.12 rows=2 width=524) (actual time=127.311..1,215.511 rows=5,476 loops=1)

6. 7.850 475.120 ↓ 3,906.0 3,906 1

Nested Loop Left Join (cost=12,583.06..18,587.40 rows=1 width=1,633) (actual time=127.311..475.120 rows=3,906 loops=1)

7. 2.436 459.458 ↓ 3,906.0 3,906 1

Nested Loop Left Join (cost=12,582.77..18,583.19 rows=1 width=1,488) (actual time=127.273..459.458 rows=3,906 loops=1)

  • Filter: ((assignments.id IS NOT NULL) OR ((steps.id = stories.current_step_id) AND (selected_users.blocked_at IS NULL)))
  • Rows Removed by Filter: 6035
8. 9.848 437.140 ↓ 9,941.0 9,941 1

Nested Loop Left Join (cost=12,582.49..18,582.54 rows=1 width=1,492) (actual time=124.207..437.140 rows=9,941 loops=1)

9. 3.749 417.351 ↓ 9,941.0 9,941 1

Nested Loop Left Join (cost=12,582.20..18,582.24 rows=1 width=1,488) (actual time=124.178..417.351 rows=9,941 loops=1)

10. 3.956 393.720 ↓ 9,941.0 9,941 1

Nested Loop Left Join (cost=12,581.92..18,581.87 rows=1 width=1,488) (actual time=124.162..393.720 rows=9,941 loops=1)

  • Join Filter: ((assignments.profile_id IS NULL) AND (steps.profile_id IS NULL))
  • Rows Removed by Join Filter: 3698
11. 1.671 379.292 ↓ 1,309.0 1,309 1

Hash Left Join (cost=12,581.63..18,581.42 rows=1 width=1,492) (actual time=124.125..379.292 rows=1,309 loops=1)

  • Hash Cond: (steps.id = rated_steps.id)
  • Filter: (((CASE WHEN (rated_steps.id IS NOT NULL) THEN 'adjustment'::text WHEN (stories.finished_at IS NOT NULL) THEN 'finished'::text WHEN (assignments.submitted_at IS NOT NULL) THEN 'delivered'::text WHEN ((assignments.id IS NULL) AND (steps.id = stories.current_step_id)) THEN 'available'::text ELSE 'pending'::text END <> 'finished'::text) OR (assignments.submitted_at > (CURRENT_DATE - '15 days'::interval))) AND ((CASE WHEN (rated_steps.id IS NOT NULL) THEN 'adjustment'::text WHEN (stories.finished_at IS NOT NULL) THEN 'finished'::text WHEN (assignments.submitted_at IS NOT NULL) THEN 'delivered'::text WHEN ((assignments.id IS NULL) AND (steps.id = stories.current_step_id)) THEN 'available'::text ELSE 'pending'::text END <> 'finished'::text) OR (assignments.submitted_at > (CURRENT_DATE - '15 days'::interval))))
  • Rows Removed by Filter: 502
12. 0.389 298.298 ↓ 1,811.0 1,811 1

Nested Loop Left Join (cost=3,143.95..9,143.73 rows=1 width=1,488) (actual time=39.709..298.298 rows=1,811 loops=1)

13. 0.000 296.098 ↓ 1,811.0 1,811 1

Gather (cost=3,143.67..9,143.10 rows=1 width=868) (actual time=39.690..296.098 rows=1,811 loops=1)

  • Workers Planned: 1
  • Workers Launched: 1
14. 39.499 339.793 ↓ 906.0 906 2

Nested Loop Left Join (cost=2,143.67..8,143.00 rows=1 width=868) (actual time=48.887..339.793 rows=906 loops=2)

  • Filter: (((profiles_4.id = 16) OR (profiles_4.id IS NULL)) AND ((profiles_4.id = 16) OR (profiles_4.id IS NULL)))
  • Rows Removed by Filter: 19932
15. 57.156 300.293 ↓ 64.1 20,838 2

Nested Loop Left Join (cost=2,143.38..8,039.91 rows=325 width=860) (actual time=43.414..300.293 rows=20,838 loops=2)

16. 45.916 243.135 ↓ 64.1 20,838 2

Nested Loop (cost=2,143.09..6,241.81 rows=325 width=836) (actual time=43.371..243.135 rows=20,838 loops=2)

17. 11.535 197.217 ↓ 64.1 20,838 2

Hash Join (cost=2,142.81..6,120.97 rows=325 width=216) (actual time=43.322..197.217 rows=20,838 loops=2)

  • Hash Cond: (steps.workflow_step_id = workflow_steps.id)
18. 8.871 167.269 ↓ 64.1 20,838 2

Hash Join (cost=1,221.12..5,198.42 rows=325 width=185) (actual time=24.412..167.269 rows=20,838 loops=2)

  • Hash Cond: (projects.account_id = accounts.id)
19. 9.373 157.867 ↓ 64.1 20,838 2

Hash Join (cost=1,195.14..5,171.59 rows=325 width=170) (actual time=23.851..157.867 rows=20,838 loops=2)

  • Hash Cond: (workflows.project_id = projects.id)
20. 40.527 147.578 ↓ 64.1 20,838 2

Nested Loop (cost=1,126.30..5,101.89 rows=325 width=136) (actual time=22.900..147.578 rows=20,838 loops=2)

21. 42.848 107.050 ↓ 64.1 20,838 2

Nested Loop (cost=1,126.02..4,979.47 rows=325 width=136) (actual time=22.864..107.050 rows=20,838 loops=2)

22. 12.266 64.201 ↓ 64.1 20,838 2

Hash Join (cost=1,125.73..4,875.61 rows=325 width=128) (actual time=22.812..64.201 rows=20,838 loops=2)

  • Hash Cond: (steps.story_id = stories.id)
23. 29.355 29.355 ↓ 63.0 20,966 2

Parallel Seq Scan on steps (cost=0.00..3,749.00 rows=333 width=28) (actual time=0.109..29.355 rows=20,966 loops=2)

  • Filter: ((deactivated_at IS NULL) AND (((group_type)::character varying)::text = 'external'::text))
  • Rows Removed by Filter: 45044
24. 10.949 22.580 ↓ 1.0 24,114 2

Hash (cost=824.32..824.32 rows=24,113 width=104) (actual time=22.580..22.580 rows=24,114 loops=2)

  • Buckets: 32768 Batches: 1 Memory Usage: 3319kB
25. 11.631 11.631 ↓ 1.0 24,114 2

Seq Scan on stories (cost=0.00..824.32 rows=24,113 width=104) (actual time=0.042..11.631 rows=24,114 loops=2)

  • Filter: (cancelled_at IS NULL)
  • Rows Removed by Filter: 619
26. 0.001 0.001 ↑ 1.0 1 41,675

Index Scan using content_types_pkey on content_types (cost=0.28..0.32 rows=1 width=16) (actual time=0.001..0.001 rows=1 loops=41,675)

  • Index Cond: (id = stories.content_type_id)
27. 0.001 0.001 ↑ 1.0 1 41,675

Index Scan using workflows_pkey on workflows (cost=0.28..0.38 rows=1 width=8) (actual time=0.001..0.001 rows=1 loops=41,675)

  • Index Cond: (id = content_types.workflow_id)
28. 0.294 0.916 ↑ 1.0 882 2

Hash (cost=57.82..57.82 rows=882 width=38) (actual time=0.916..0.916 rows=882 loops=2)

  • Buckets: 1024 Batches: 1 Memory Usage: 71kB
29. 0.622 0.622 ↑ 1.0 882 2

Seq Scan on projects (cost=0.00..57.82 rows=882 width=38) (actual time=0.035..0.622 rows=882 loops=2)

30. 0.236 0.531 ↑ 1.0 799 2

Hash (cost=15.99..15.99 rows=799 width=19) (actual time=0.531..0.531 rows=799 loops=2)

  • Buckets: 1024 Batches: 1 Memory Usage: 48kB
31. 0.295 0.295 ↑ 1.0 799 2

Seq Scan on accounts (cost=0.00..15.99 rows=799 width=19) (actual time=0.055..0.295 rows=799 loops=2)

32. 8.663 18.413 ↓ 1.0 20,254 2

Hash (cost=668.53..668.53 rows=20,253 width=35) (actual time=18.413..18.413 rows=20,254 loops=2)

  • Buckets: 32768 Batches: 1 Memory Usage: 1628kB
33. 9.750 9.750 ↓ 1.0 20,254 2

Seq Scan on workflow_steps (cost=0.00..668.53 rows=20,253 width=35) (actual time=0.047..9.750 rows=20,254 loops=2)

34. 0.002 0.002 ↑ 1.0 1 41,675

Index Scan using users_pkey on users story_creators (cost=0.28..0.37 rows=1 width=624) (actual time=0.002..0.002 rows=1 loops=41,675)

  • Index Cond: (id = stories.created_by)
35. 0.002 0.002 ↑ 1.0 1 41,675

Index Scan using index_assignments_on_step_id on assignments (cost=0.29..5.53 rows=1 width=28) (actual time=0.002..0.002 rows=1 loops=41,675)

  • Index Cond: (steps.id = step_id)
36. 0.001 0.001 ↑ 1.0 1 41,675

Index Scan using profiles_pkey on profiles profiles_4 (cost=0.28..0.30 rows=1 width=8) (actual time=0.001..0.001 rows=1 loops=41,675)

  • Index Cond: (assignments.profile_id = id)
37. 1.811 1.811 ↓ 0.0 0 1,811

Index Scan using users_pkey on users (cost=0.28..0.63 rows=1 width=624) (actual time=0.001..0.001 rows=0 loops=1,811)

  • Index Cond: (profiles_4.user_id = id)
38. 0.309 79.323 ↑ 1.5 750 1

Hash (cost=9,423.49..9,423.49 rows=1,135 width=4) (actual time=79.323..79.323 rows=750 loops=1)

  • Buckets: 2048 Batches: 1 Memory Usage: 43kB
39. 0.270 79.014 ↑ 1.5 750 1

Unique (cost=9,406.47..9,412.14 rows=1,135 width=4) (actual time=78.605..79.014 rows=750 loops=1)

40. 0.846 78.744 ↑ 1.2 982 1

Sort (cost=9,406.47..9,409.30 rows=1,135 width=4) (actual time=78.604..78.744 rows=982 loops=1)

  • Sort Key: rated_steps.id
  • Sort Method: quicksort Memory: 71kB
41. 19.080 77.898 ↑ 1.2 982 1

Gather (cost=1,272.99..9,348.87 rows=1,135 width=4) (actual time=4.846..77.898 rows=982 loops=1)

  • Workers Planned: 2
  • Workers Launched: 2
42. 4.836 58.818 ↑ 1.4 327 3

Nested Loop (cost=272.99..8,235.37 rows=473 width=4) (actual time=4.310..58.818 rows=327 loops=3)

43. 10.643 53.969 ↑ 1.6 346 3

Hash Join (cost=272.57..5,672.77 rows=552 width=4) (actual time=4.259..53.969 rows=346 loops=3)

  • Hash Cond: (messages.id = adjustment_requests.message_id)
44. 39.715 39.715 ↑ 1.2 57,571 3

Parallel Seq Scan on messages (cost=0.00..5,211.46 rows=71,902 width=4) (actual time=0.031..39.715 rows=57,571 loops=3)

  • Filter: (deleted_at IS NULL)
  • Rows Removed by Filter: 934
45. 0.463 3.611 ↑ 1.0 1,347 3

Hash (cost=255.73..255.73 rows=1,347 width=8) (actual time=3.611..3.611 rows=1,347 loops=3)

  • Buckets: 2048 Batches: 1 Memory Usage: 69kB
46. 3.148 3.148 ↑ 1.0 1,347 3

Seq Scan on adjustment_requests (cost=0.00..255.73 rows=1,347 width=8) (actual time=0.045..3.148 rows=1,347 loops=3)

  • Filter: (solved_at IS NULL)
  • Rows Removed by Filter: 11227
47. 0.013 0.013 ↑ 1.0 1 1,037

Index Scan using steps_pkey on steps rated_steps (cost=0.42..4.64 rows=1 width=4) (actual time=0.013..0.013 rows=1 loops=1,037)

  • Index Cond: (id = adjustment_requests.target_id)
  • Filter: (deactivated_at IS NULL)
  • Rows Removed by Filter: 0
48. 10.472 10.472 ↓ 2.5 10 1,309

Index Scan using index_collaborators_roles_on_role_id on collaborators_roles (cost=0.29..0.42 rows=4 width=8) (actual time=0.003..0.008 rows=10 loops=1,309)

  • Index Cond: (workflow_steps.role_id = role_id)
49. 19.882 19.882 ↑ 1.0 1 9,941

Index Scan using collaborators_pkey on collaborators collaborators_4 (cost=0.29..0.36 rows=1 width=8) (actual time=0.002..0.002 rows=1 loops=9,941)

  • Index Cond: (collaborators_roles.collaborator_id = id)
50. 9.941 9.941 ↑ 1.0 1 9,941

Index Scan using profiles_pkey on profiles selected_profiles (cost=0.28..0.31 rows=1 width=8) (actual time=0.001..0.001 rows=1 loops=9,941)

  • Index Cond: (collaborators_4.profile_id = id)
51. 19.882 19.882 ↑ 1.0 1 9,941

Index Scan using users_pkey on users selected_users (cost=0.28..0.63 rows=1 width=12) (actual time=0.002..0.002 rows=1 loops=9,941)

  • Index Cond: (selected_profiles.user_id = id)
52. 7.812 7.812 ↑ 1.0 1 3,906

Index Scan using index_bills_on_step_id on bills (cost=0.29..4.17 rows=1 width=12) (actual time=0.002..0.002 rows=1 loops=3,906)

  • Index Cond: (steps.id = step_id)
53. 0.486 739.575 ↓ 1,570.0 1,570 1

Subquery Scan on *SELECT* 2 (cost=3,890.94..6,319.71 rows=1 width=1,619) (actual time=83.024..739.575 rows=1,570 loops=1)

54. 1.828 739.089 ↓ 1,570.0 1,570 1

Nested Loop Left Join (cost=3,890.94..6,319.69 rows=1 width=1,615) (actual time=83.023..739.089 rows=1,570 loops=1)

55. 49.453 737.261 ↓ 1,570.0 1,570 1

Nested Loop Left Join (cost=3,890.65..6,319.05 rows=1 width=858) (actual time=82.987..737.261 rows=1,570 loops=1)

  • Join Filter: (profiles_5.id = ideas.profile_id)
  • Rows Removed by Join Filter: 327084
  • Filter: (((ideas.id IS NOT NULL) OR ((users_1.blocked_at IS NULL) AND (NOT idea_requests.default_request))) AND ((CASE WHEN (ideas.status = 'approved'::idea_status_option) THEN 'finished'::text WHEN (ideas.id IS NOT NULL) THEN 'delivered'::text ELSE 'available'::text END <> 'finished'::text) OR (ideas.created_at > (CURRENT_DATE - '15 days'::interval))) AND ((CASE WHEN (ideas.status = 'approved'::idea_status_option) THEN 'finished'::text WHEN (ideas.id IS NOT NULL) THEN 'delivered'::text ELSE 'available'::text END <> 'finished'::text) OR (ideas.created_at > (CURRENT_DATE - '15 days'::interval))))
  • Rows Removed by Filter: 41091
56. 143.221 508.428 ↓ 35,876.0 35,876 1

Nested Loop Left Join (cost=3,890.37..6,313.71 rows=1 width=785) (actual time=81.998..508.428 rows=35,876 loops=1)

  • Filter: ((idea_requests.group_type = 'everyone'::idea_request_group_types) OR ((idea_requests.group_type = 'assigned'::idea_request_group_types) AND (idea_request_assignments.deleted_at IS NULL) AND (idea_request_assignments.collaborator_id = collaborators_5.id)) OR (idea_requests.role_id = collaborators_roles_1.role_id))
  • Rows Removed by Filter: 154066
57. 50.721 193.625 ↓ 171,582.0 171,582 1

Hash Left Join (cost=3,890.08..6,313.35 rows=1 width=809) (actual time=80.705..193.625 rows=171,582 loops=1)

  • Hash Cond: (idea_requests.id = idea_request_assignments.idea_request_id)
  • Filter: (((idea_request_profiles.id = 16) OR (idea_request_profiles.id IS NULL)) AND ((idea_request_profiles.id = 16) OR (idea_request_profiles.id IS NULL)))
  • Rows Removed by Filter: 268
58. 56.445 129.419 ↓ 1.8 171,828 1

Hash Join (cost=2,755.29..4,023.21 rows=93,494 width=789) (actual time=67.177..129.419 rows=171,828 loops=1)

  • Hash Cond: (themes.project_id = projects_1.id)
59. 1.979 12.923 ↓ 1.3 3,572 1

Hash Join (cost=653.26..863.88 rows=2,719 width=720) (actual time=6.955..12.923 rows=3,572 loops=1)

  • Hash Cond: (idea_requests.created_by_id = idea_request_creator.id)
60. 2.097 6.352 ↓ 1.3 3,572 1

Hash Join (cost=149.75..353.22 rows=2,719 width=100) (actual time=2.150..6.352 rows=3,572 loops=1)

  • Hash Cond: (idea_requests.theme_id = themes.id)
61. 2.135 2.135 ↓ 1.3 3,572 1

Seq Scan on idea_requests (cost=0.00..196.32 rows=2,719 width=71) (actual time=0.021..2.135 rows=3,572 loops=1)

  • Filter: ((deactivated_at IS NULL) AND (deactivated_at IS NULL) AND ((starts_at IS NULL) OR (starts_at <= (now())::date)) AND ((ends_at IS NULL) OR (ends_at >= (now())::date)))
  • Rows Removed by Filter: 685
62. 1.056 2.120 ↑ 1.0 3,722 1

Hash (cost=103.22..103.22 rows=3,722 width=37) (actual time=2.120..2.120 rows=3,722 loops=1)

  • Buckets: 4096 Batches: 1 Memory Usage: 289kB
63. 1.064 1.064 ↑ 1.0 3,722 1

Seq Scan on themes (cost=0.00..103.22 rows=3,722 width=37) (actual time=0.012..1.064 rows=3,722 loops=1)

64. 2.782 4.592 ↑ 1.0 4,334 1

Hash (cost=449.34..449.34 rows=4,334 width=624) (actual time=4.591..4.592 rows=4,334 loops=1)

  • Buckets: 8192 Batches: 1 Memory Usage: 919kB
65. 1.810 1.810 ↑ 1.0 4,334 1

Seq Scan on users idea_request_creator (cost=0.00..449.34 rows=4,334 width=624) (actual time=0.007..1.810 rows=4,334 loops=1)

66. 14.491 60.051 ↑ 1.0 30,328 1

Hash (cost=1,722.93..1,722.93 rows=30,328 width=77) (actual time=60.051..60.051 rows=30,328 loops=1)

  • Buckets: 32768 Batches: 1 Memory Usage: 3571kB
67. 8.983 45.560 ↑ 1.0 30,328 1

Hash Join (cost=755.26..1,722.93 rows=30,328 width=77) (actual time=6.012..45.560 rows=30,328 loops=1)

  • Hash Cond: (profiles_5.user_id = users_1.id)
68. 9.173 34.074 ↑ 1.0 30,328 1

Hash Join (cost=251.75..1,139.73 rows=30,328 width=73) (actual time=3.369..34.074 rows=30,328 loops=1)

  • Hash Cond: (collaborators_5.profile_id = profiles_5.id)
69. 7.889 22.729 ↑ 1.0 30,328 1

Hash Join (cost=94.82..903.13 rows=30,328 width=65) (actual time=1.078..22.729 rows=30,328 loops=1)

  • Hash Cond: (projects_1.account_id = accounts_1.id)
70. 9.693 14.386 ↑ 1.0 30,328 1

Hash Join (cost=68.84..797.11 rows=30,328 width=50) (actual time=0.598..14.386 rows=30,328 loops=1)

  • Hash Cond: (collaborators_5.project_id = projects_1.id)
71. 4.127 4.127 ↑ 1.0 30,328 1

Seq Scan on collaborators collaborators_5 (cost=0.00..648.28 rows=30,328 width=12) (actual time=0.009..4.127 rows=30,328 loops=1)

72. 0.306 0.566 ↑ 1.0 882 1

Hash (cost=57.82..57.82 rows=882 width=38) (actual time=0.566..0.566 rows=882 loops=1)

  • Buckets: 1024 Batches: 1 Memory Usage: 71kB
73. 0.260 0.260 ↑ 1.0 882 1

Seq Scan on projects projects_1 (cost=0.00..57.82 rows=882 width=38) (actual time=0.006..0.260 rows=882 loops=1)

74. 0.279 0.454 ↑ 1.0 799 1

Hash (cost=15.99..15.99 rows=799 width=19) (actual time=0.454..0.454 rows=799 loops=1)

  • Buckets: 1024 Batches: 1 Memory Usage: 48kB
75. 0.175 0.175 ↑ 1.0 799 1

Seq Scan on accounts accounts_1 (cost=0.00..15.99 rows=799 width=19) (actual time=0.011..0.175 rows=799 loops=1)

76. 1.297 2.172 ↑ 1.0 5,241 1

Hash (cost=91.41..91.41 rows=5,241 width=12) (actual time=2.172..2.172 rows=5,241 loops=1)

  • Buckets: 8192 Batches: 1 Memory Usage: 290kB
77. 0.875 0.875 ↑ 1.0 5,241 1

Seq Scan on profiles profiles_5 (cost=0.00..91.41 rows=5,241 width=12) (actual time=0.014..0.875 rows=5,241 loops=1)

78. 0.963 2.503 ↑ 1.0 4,334 1

Hash (cost=449.34..449.34 rows=4,334 width=12) (actual time=2.503..2.503 rows=4,334 loops=1)

  • Buckets: 8192 Batches: 1 Memory Usage: 217kB
79. 1.540 1.540 ↑ 1.0 4,334 1

Seq Scan on users users_1 (cost=0.00..449.34 rows=4,334 width=12) (actual time=0.006..1.540 rows=4,334 loops=1)

80. 0.102 13.485 ↓ 1.0 315 1

Hash (cost=1,130.86..1,130.86 rows=314 width=24) (actual time=13.485..13.485 rows=315 loops=1)

  • Buckets: 1024 Batches: 1 Memory Usage: 23kB
81. 0.168 13.383 ↓ 1.0 315 1

Nested Loop Left Join (cost=1,027.66..1,130.86 rows=314 width=24) (actual time=12.787..13.383 rows=315 loops=1)

82. 0.289 12.900 ↓ 1.0 315 1

Hash Left Join (cost=1,027.38..1,034.34 rows=314 width=20) (actual time=12.759..12.900 rows=315 loops=1)

  • Hash Cond: (idea_request_assignments.collaborator_id = idea_request_collaborators.id)
83. 0.060 0.060 ↓ 1.0 315 1

Seq Scan on idea_request_assignments (cost=0.00..6.14 rows=314 width=16) (actual time=0.018..0.060 rows=315 loops=1)

84. 7.243 12.551 ↑ 1.0 30,328 1

Hash (cost=648.28..648.28 rows=30,328 width=8) (actual time=12.551..12.551 rows=30,328 loops=1)

  • Buckets: 32768 Batches: 1 Memory Usage: 1441kB
85. 5.308 5.308 ↑ 1.0 30,328 1

Seq Scan on collaborators idea_request_collaborators (cost=0.00..648.28 rows=30,328 width=8) (actual time=0.009..5.308 rows=30,328 loops=1)

86. 0.315 0.315 ↑ 1.0 1 315

Index Scan using profiles_pkey on profiles idea_request_profiles (cost=0.28..0.31 rows=1 width=8) (actual time=0.001..0.001 rows=1 loops=315)

  • Index Cond: (idea_request_collaborators.profile_id = id)
87. 171.582 171.582 ↑ 1.0 1 171,582

Index Scan using index_collaborators_roles_on_collaborator_id on collaborators_roles collaborators_roles_1 (cost=0.29..0.35 rows=1 width=8) (actual time=0.001..0.001 rows=1 loops=171,582)

  • Index Cond: (collaborator_id = collaborators_5.id)
88. 179.380 179.380 ↓ 1.5 9 35,876

Index Scan using index_ideas_on_idea_request_id on ideas (cost=0.29..5.11 rows=6 width=90) (actual time=0.001..0.005 rows=9 loops=35,876)

  • Index Cond: (idea_requests.id = idea_request_id)
89. 0.000 0.000 ↓ 0.0 0 1,570

Index Scan using users_pkey on users idea_request_users (cost=0.28..0.63 rows=1 width=624) (actual time=0.000..0.000 rows=0 loops=1,570)

  • Index Cond: (idea_request_profiles.user_id = id)
90. 0.048 0.866 ↓ 25.0 100 1

Hash (cost=34.38..34.38 rows=4 width=8) (actual time=0.866..0.866 rows=100 loops=1)

  • Buckets: 1024 Batches: 1 Memory Usage: 12kB
91. 0.039 0.818 ↓ 25.0 100 1

Nested Loop (cost=4.62..34.38 rows=4 width=8) (actual time=0.155..0.818 rows=100 loops=1)

92. 0.021 0.021 ↑ 1.0 1 1

Index Scan using index_profiles_on_user_id_and_name on profiles (cost=0.28..8.30 rows=1 width=4) (actual time=0.020..0.021 rows=1 loops=1)

  • Index Cond: (user_id = 16)
93. 0.654 0.758 ↓ 20.0 100 1

Bitmap Heap Scan on collaborators (cost=4.33..26.03 rows=5 width=4) (actual time=0.123..0.758 rows=100 loops=1)

  • Recheck Cond: ((profile_id = profiles.id) AND (declined_at IS NULL) AND (finished_at IS NULL))
  • Filter: (started_at IS NOT NULL)
  • Heap Blocks: exact=86
94. 0.104 0.104 ↓ 16.7 100 1

Bitmap Index Scan on index_collaborators_on_profile_id_and_project_id (cost=0.00..4.33 rows=6 width=0) (actual time=0.104..0.104 rows=100 loops=1)

  • Index Cond: (profile_id = profiles.id)
95. 1.048 2.227 ↑ 1.0 1 131

Hash Join (cost=0.61..0.80 rows=1 width=8) (actual time=0.017..0.017 rows=1 loops=131)

  • Hash Cond: (collaborators_2.profile_id = profiles_2.id)
96. 0.655 0.655 ↑ 5.0 1 131

Index Scan using index_collaborators_on_profile_id_and_project_id on collaborators collaborators_2 (cost=0.29..0.47 rows=5 width=4) (actual time=0.005..0.005 rows=1 loops=131)

  • Index Cond: (profile_id = collaborators.profile_id)
  • Filter: (started_at IS NOT NULL)
97. 0.131 0.524 ↑ 1.0 1 131

Hash (cost=0.31..0.31 rows=1 width=4) (actual time=0.004..0.004 rows=1 loops=131)

  • Buckets: 1024 Batches: 1 Memory Usage: 9kB
98. 0.393 0.393 ↑ 1.0 1 131

Index Scan using profiles_pkey on profiles profiles_2 (cost=0.28..0.31 rows=1 width=4) (actual time=0.002..0.003 rows=1 loops=131)

  • Index Cond: (id = collaborators.profile_id)
  • Filter: (user_id = 16)
99. 0.262 0.786 ↑ 1.0 1 131

Nested Loop (cost=0.57..16.62 rows=1 width=4) (actual time=0.006..0.006 rows=1 loops=131)

100. 0.262 0.262 ↑ 1.0 1 131

Index Scan using index_profiles_on_user_id_and_name on profiles profiles_1 (cost=0.28..8.30 rows=1 width=4) (actual time=0.002..0.002 rows=1 loops=131)

  • Index Cond: (user_id = 16)
101. 0.262 0.262 ↑ 1.0 1 131

Index Scan using index_collaborators_on_profile_id_and_project_id on collaborators collaborators_1 (cost=0.29..8.31 rows=1 width=8) (actual time=0.002..0.002 rows=1 loops=131)

  • Index Cond: ((profile_id = profiles_1.id) AND (project_id = projects.id))
  • Filter: (started_at IS NOT NULL)
102. 0.000 5.082 ↑ 1.0 1 121

Nested Loop (cost=0.57..9.13 rows=1 width=4) (actual time=0.042..0.042 rows=1 loops=121)

103. 2.420 2.420 ↑ 2.2 12 121

Index Scan using index_collaborators_on_project_id on collaborators collaborators_3 (cost=0.29..0.98 rows=26 width=8) (actual time=0.007..0.020 rows=12 loops=121)

  • Index Cond: (project_id = collaborators_1.project_id)
  • Filter: ((declined_at IS NULL) AND (started_at IS NOT NULL) AND (finished_at IS NULL))
  • Rows Removed by Filter: 9
104. 2.838 2.838 ↓ 0.0 0 1,419

Index Scan using profiles_pkey on profiles profiles_3 (cost=0.28..0.31 rows=1 width=4) (actual time=0.002..0.002 rows=0 loops=1,419)

  • Index Cond: (id = collaborators_3.profile_id)
  • Filter: (user_id = 16)
  • Rows Removed by Filter: 1
Planning time : 105.763 ms
Execution time : 1,228.823 ms