explain.depesz.com

PostgreSQL's explain analyze made readable

Result: Iu8O

Settings
# exclusive inclusive rows x rows loops node
1. 0.002 123.986 ↓ 0.0 0 1

HashAggregate (cost=783.21..783.21 rows=1 width=16) (actual time=123.986..123.986 rows=0 loops=1)

  • Group Key: conversations.id
2. 0.154 123.984 ↓ 0.0 0 1

Nested Loop (cost=8.30..783.21 rows=1 width=16) (actual time=123.984..123.984 rows=0 loops=1)

3. 0.094 9.905 ↑ 9.1 525 1

Nested Loop (cost=8.21..65.91 rows=4,752 width=16) (actual time=4.022..9.905 rows=525 loops=1)

4. 0.000 3.037 ↓ 2.0 2 1

Unique (cost=8.13..8.13 rows=1 width=32) (actual time=3.035..3.037 rows=2 loops=1)

5. 0.040 3.037 ↓ 2.0 2 1

Sort (cost=8.13..8.13 rows=1 width=32) (actual time=3.035..3.037 rows=2 loops=1)

  • Sort Key: teams.id
  • Sort Method: quicksort Memory: 25kB
6. 0.003 2.997 ↓ 2.0 2 1

Nested Loop (cost=0.11..8.13 rows=1 width=32) (actual time=2.032..2.997 rows=2 loops=1)

7. 1.084 1.084 ↓ 2.0 2 1

Index Scan using index_teams_users_on_user_id on teams_users (cost=0.06..4.06 rows=1 width=16) (actual time=1.082..1.084 rows=2 loops=1)

  • Index Cond: (user_id = 'cd761796-920f-4339-962c-d2baede2eafb'::uuid)
8. 1.910 1.910 ↑ 1.0 1 2

Index Scan using teams_pkey on teams (cost=0.06..4.06 rows=1 width=16) (actual time=0.955..0.955 rows=1 loops=2)

  • Index Cond: (id = teams_users.team_id)
  • Filter: (deleted_at IS NULL)
9. 6.774 6.774 ↑ 18.1 262 2

Index Scan using index_assignments_on_assignee_id_and_assignee_type on assignments (cost=0.09..43.52 rows=4,752 width=32) (actual time=1.004..3.387 rows=262 loops=2)

  • Index Cond: ((assignee_id = teams.id) AND ((assignee_type)::text = 'Team'::text))
  • Filter: (deleted_at IS NULL)
10. 113.925 113.925 ↓ 0.0 0 525

Index Scan using conversations_pkey on conversations (cost=0.09..0.15 rows=1 width=16) (actual time=0.217..0.217 rows=0 loops=525)

  • Index Cond: (id = assignments.conversation_id)
  • Filter: ((deleted_at IS NULL) AND (status <> 2) AND (business_id = '9c2c9a4c-d64b-4d0a-8d28-a9a655f3933d'::uuid))
  • Rows Removed by Filter: 1
Planning time : 25.645 ms