explain.depesz.com

PostgreSQL's explain analyze made readable

Result: c9Q8

Settings
# exclusive inclusive rows x rows loops node
1. 0.035 1.221 ↓ 13.0 13 1

Nested Loop Left Join (cost=5.08..145.47 rows=1 width=9,662) (actual time=0.136..1.221 rows=13 loops=1)

  • Join Filter: (aagp_cs.id = aagp.""completionStatusId"")
  • Rows Removed by Join Filter: 39
2. 0.028 1.147 ↓ 13.0 13 1

Nested Loop Left Join (cost=5.08..143.86 rows=1 width=9,651) (actual time=0.126..1.147 rows=13 loops=1)

  • Join Filter: (aagp.""userId"" = activity_participants.""userId"")
3. 0.027 1.119 ↓ 13.0 13 1

Nested Loop Left Join (cost=4.53..141.50 rows=1 width=9,692) (actual time=0.124..1.119 rows=13 loops=1)

4. 0.027 1.092 ↓ 13.0 13 1

Nested Loop Left Join (cost=4.11..138.68 rows=1 width=9,615) (actual time=0.120..1.092 rows=13 loops=1)

5. 0.027 1.065 ↓ 13.0 13 1

Nested Loop Left Join (cost=3.97..138.32 rows=1 width=8,067) (actual time=0.118..1.065 rows=13 loops=1)

6. 0.027 1.038 ↓ 13.0 13 1

Nested Loop Left Join (cost=3.69..136.82 rows=1 width=7,736) (actual time=0.115..1.038 rows=13 loops=1)

7. 0.026 1.011 ↓ 13.0 13 1

Nested Loop Left Join (cost=3.55..135.95 rows=1 width=7,236) (actual time=0.112..1.011 rows=13 loops=1)

8. 0.026 0.985 ↓ 13.0 13 1

Nested Loop Left Join (cost=3.41..135.06 rows=1 width=6,736) (actual time=0.110..0.985 rows=13 loops=1)

9. 0.012 0.959 ↓ 13.0 13 1

Nested Loop Left Join (cost=3.26..134.19 rows=1 width=6,236) (actual time=0.106..0.959 rows=13 loops=1)

10. 0.011 0.934 ↓ 13.0 13 1

Nested Loop Left Join (cost=3.12..133.31 rows=1 width=5,216) (actual time=0.104..0.934 rows=13 loops=1)

11. 0.025 0.910 ↓ 13.0 13 1

Nested Loop Left Join (cost=2.98..132.43 rows=1 width=4,200) (actual time=0.101..0.910 rows=13 loops=1)

12. 0.026 0.885 ↓ 13.0 13 1

Nested Loop Left Join (cost=2.83..131.55 rows=1 width=3,688) (actual time=0.099..0.885 rows=13 loops=1)

13. 0.031 0.846 ↓ 13.0 13 1

Nested Loop Left Join (cost=2.69..130.67 rows=1 width=3,608) (actual time=0.093..0.846 rows=13 loops=1)

14. 0.020 0.789 ↓ 13.0 13 1

Nested Loop Left Join (cost=2.54..129.79 rows=1 width=3,096) (actual time=0.086..0.789 rows=13 loops=1)

15. 0.028 0.743 ↓ 13.0 13 1

Nested Loop Left Join (cost=2.40..128.91 rows=1 width=2,584) (actual time=0.084..0.743 rows=13 loops=1)

16. 0.009 0.715 ↓ 13.0 13 1

Nested Loop Left Join (cost=2.25..128.03 rows=1 width=2,072) (actual time=0.081..0.715 rows=13 loops=1)

17. 0.029 0.693 ↓ 13.0 13 1

Nested Loop Left Join (cost=2.10..127.15 rows=1 width=1,560) (actual time=0.079..0.693 rows=13 loops=1)

18. 0.033 0.638 ↓ 13.0 13 1

Nested Loop Left Join (cost=1.96..126.26 rows=1 width=1,048) (actual time=0.074..0.638 rows=13 loops=1)

19. 0.052 0.579 ↓ 13.0 13 1

Nested Loop Left Join (cost=1.82..125.38 rows=1 width=536) (actual time=0.066..0.579 rows=13 loops=1)

  • Join Filter: (completion_statuses.id = activity_participants.""completionStatusId"")
  • Rows Removed by Join Filter: 26
20. 0.029 0.488 ↓ 13.0 13 1

Nested Loop Left Join (cost=1.82..123.78 rows=1 width=521) (actual time=0.059..0.488 rows=13 loops=1)

21. 0.023 0.433 ↓ 13.0 13 1

Nested Loop Left Join (cost=1.68..123.39 rows=1 width=407) (actual time=0.053..0.433 rows=13 loops=1)

22. 0.022 0.410 ↓ 13.0 13 1

Nested Loop Left Join (cost=1.54..122.78 rows=1 width=255) (actual time=0.051..0.410 rows=13 loops=1)

23. 0.018 0.297 ↓ 13.0 13 1

Nested Loop Left Join (cost=1.11..111.43 rows=1 width=239) (actual time=0.042..0.297 rows=13 loops=1)

  • Filter: (((activities.""deletedAt"" IS NULL) AND (activity_participants.""deletedAt"" IS NULL)) OR ((deleted_reasons.value)::text = ANY ('{EXPIRED,LOST_ELIGIBILITY}'::text[])))
24. 0.030 0.266 ↓ 13.0 13 1

Nested Loop (cost=0.98..111.04 rows=1 width=251) (actual time=0.038..0.266 rows=13 loops=1)

25. 0.067 0.067 ↑ 1.9 13 1

Index Scan using activity_rootid on activities (cost=0.42..36.85 rows=25 width=136) (actual time=0.017..0.067 rows=13 loops=1)

  • Index Cond: (""rootId"" = ANY ('{54318,54324,54304,54310,54312}'::integer[]))
26. 0.169 0.169 ↑ 1.0 1 13

Index Scan using activity_participants_activityid_userid_unique on activity_participants (cost=0.56..2.87 rows=1 width=123) (actual time=0.012..0.013 rows=1 loops=13)

  • Index Cond: ((""activityId"" = activities.id) AND (""userId"" = '24a8398514996d6da25375deccf74170f8770f52'::text))
27. 0.013 0.013 ↓ 0.0 0 13

Index Scan using deleted_reasons_pkey on deleted_reasons (cost=0.13..0.29 rows=1 width=19) (actual time=0.001..0.001 rows=0 loops=13)

  • Index Cond: (activity_participants.""deletedReasonId"" = id)
28. 0.091 0.091 ↓ 0.0 0 13

Index Only Scan using activity_participants_metrics_3columns on activity_participants_metrics (cost=0.43..9.05 rows=23 width=32) (actual time=0.007..0.007 rows=0 loops=13)

  • Index Cond: (""activityParticipantsUuid"" = activity_participants.uuid)
  • Heap Fetches: 0
29. 0.000 0.000 ↓ 0.0 0 13

Index Scan using wellsource_hra_settings_pkey on wellsource_hra_settings hra (cost=0.14..0.52 rows=1 width=156) (actual time=0.000..0.000 rows=0 loops=13)

  • Index Cond: (activities.""wellsourceHraSettingsId"" = id)
30. 0.026 0.026 ↑ 1.0 1 13

Index Scan using created_reasons_pkey on created_reasons (cost=0.13..0.29 rows=1 width=122) (actual time=0.002..0.002 rows=1 loops=13)

  • Index Cond: (id = activity_participants.""createdReasonId"")
31. 0.039 0.039 ↑ 1.0 3 13

Seq Scan on completion_statuses (cost=0.00..1.30 rows=3 width=19) (actual time=0.001..0.003 rows=3 loops=13)

32. 0.026 0.026 ↑ 1.0 1 13

Index Scan using activity_prefixes_pkey on activity_prefixes (cost=0.14..0.78 rows=1 width=520) (actual time=0.002..0.002 rows=1 loops=13)

  • Index Cond: (activities.""prefixId"" = id)
33. 0.026 0.026 ↑ 1.0 1 13

Index Scan using activity_types_pkey on activity_types (cost=0.14..0.78 rows=1 width=520) (actual time=0.002..0.002 rows=1 loops=13)

  • Index Cond: (activities.""activityTypeId"" = id)
34. 0.013 0.013 ↓ 0.0 0 13

Index Scan using category_types_pkey on category_types (cost=0.14..0.78 rows=1 width=520) (actual time=0.001..0.001 rows=0 loops=13)

  • Index Cond: (activities.""categoryTypeId"" = id)
35. 0.000 0.000 ↓ 0.0 0 13

Index Scan using completion_labels_pkey on completion_labels (cost=0.14..0.78 rows=1 width=520) (actual time=0.000..0.000 rows=0 loops=13)

  • Index Cond: (activities.""completionLabelId"" = id)
36. 0.026 0.026 ↑ 1.0 1 13

Index Scan using content_types_pkey on content_types (cost=0.14..0.78 rows=1 width=520) (actual time=0.001..0.002 rows=1 loops=13)

  • Index Cond: (activities.""contentTypeId"" = id)
37. 0.026 0.026 ↑ 1.0 1 13

Index Scan using reporting_types_pkey on reporting_types (cost=0.14..0.78 rows=1 width=520) (actual time=0.002..0.002 rows=1 loops=13)

  • Index Cond: (activities.""reportingTypeId"" = id)
38. 0.013 0.013 ↓ 0.0 0 13

Index Scan using event_activities_pkey on event_activities (cost=0.15..0.78 rows=1 width=84) (actual time=0.001..0.001 rows=0 loops=13)

  • Index Cond: (activities.""eventActivityId"" = id)
39. 0.000 0.000 ↓ 0.0 0 13

Index Scan using time_units_pkey on time_units fu (cost=0.14..0.78 rows=1 width=520) (actual time=0.000..0.000 rows=0 loops=13)

  • Index Cond: (activities.""frequencyUnitId"" = id)
40. 0.013 0.013 ↓ 0.0 0 13

Index Scan using activity_metrics_uuid_unique on activity_metrics metric (cost=0.14..0.78 rows=1 width=1,048) (actual time=0.001..0.001 rows=0 loops=13)

  • Index Cond: (activities.""activityMetricUuid"" = uuid)
41. 0.013 0.013 ↓ 0.0 0 13

Index Scan using activity_units_uuid_unique on activity_units unit (cost=0.14..0.78 rows=1 width=1,052) (actual time=0.001..0.001 rows=0 loops=13)

  • Index Cond: (activities.""activityUnitUuid"" = uuid)
42. 0.000 0.000 ↓ 0.0 0 13

Index Scan using activity_categories_uuid_unique on activity_categories category (cost=0.14..0.78 rows=1 width=532) (actual time=0.000..0.000 rows=0 loops=13)

  • Index Cond: (activities.""activityCategoryUuid"" = uuid)
43. 0.000 0.000 ↓ 0.0 0 13

Index Scan using activity_subcategories_uuid_unique on activity_subcategories (cost=0.14..0.78 rows=1 width=532) (actual time=0.000..0.000 rows=0 loops=13)

  • Index Cond: (activities.""activitySubcategoryUuid"" = uuid)
44. 0.000 0.000 ↓ 0.0 0 13

Index Scan using activity_kinds_uuid_unique on activity_kinds kind (cost=0.14..0.78 rows=1 width=532) (actual time=0.000..0.000 rows=0 loops=13)

  • Index Cond: (activities.""activityKindUuid"" = uuid)
45. 0.000 0.000 ↓ 0.0 0 13

Index Scan using activity_health_measures_pkey on activity_health_measures ahm (cost=0.28..1.40 rows=1 width=335) (actual time=0.000..0.000 rows=0 loops=13)

  • Index Cond: (activities.""activityHealthMeasureId"" = id)
46. 0.000 0.000 ↓ 0.0 0 13

Index Scan using activity_health_measure_types_pkey on activity_health_measure_types ahmt (cost=0.14..0.26 rows=1 width=1,552) (actual time=0.000..0.000 rows=0 loops=13)

  • Index Cond: (ahm.""healthMeasureTypeId"" = id)
47. 0.000 0.000 ↓ 0.0 0 13

Index Scan using activity_groups_id_deletedat on activity_groups aag (cost=0.42..2.73 rows=1 width=81) (actual time=0.000..0.000 rows=0 loops=13)

  • Index Cond: (activities.""alternativeActivityGroupId"" = id)
48. 0.000 0.000 ↓ 0.0 0 13

Index Scan using unique_userid_activitygroupid_activity_group_participants on activity_group_participants aagp (cost=0.56..2.26 rows=1 width=49) (actual time=0.000..0.000 rows=0 loops=13)

  • Index Cond: ((""userId"" = '24a8398514996d6da25375deccf74170f8770f52'::text) AND (""activityGroupId"" = aag.id))
49. 0.039 0.039 ↑ 1.0 3 13

Seq Scan on completion_statuses aagp_cs (cost=0.00..1.30 rows=3 width=19) (actual time=0.001..0.003 rows=3 loops=13)