explain.depesz.com

PostgreSQL's explain analyze made readable

Result: p44C

Settings
# exclusive inclusive rows x rows loops node
1. 0.009 2,833.313 ↓ 0.0 0 1

Sort (cost=629,684.22..629,684.22 rows=1 width=127) (actual time=2,833.313..2,833.313 rows=0 loops=1)

  • Sort Key: nu.created_at DESC
  • Sort Method: quicksort Memory: 25kB
2. 0.001 2,833.304 ↓ 0.0 0 1

Nested Loop (cost=1.26..629,684.21 rows=1 width=127) (actual time=2,833.304..2,833.304 rows=0 loops=1)

3. 0.003 2,833.303 ↓ 0.0 0 1

Nested Loop (cost=0.83..629,676.04 rows=1 width=110) (actual time=2,833.303..2,833.303 rows=0 loops=1)

4. 0.049 0.049 ↑ 1.0 1 1

Index Scan using correspondence_entity_type_entity_id_idx on correspondence c (cost=0.28..8.30 rows=1 width=8) (actual time=0.044..0.049 rows=1 loops=1)

  • Index Cond: ((entity_type = 'RemediationRequest'::text) AND (entity_id = 612))
5. 2,833.251 2,833.251 ↓ 0.0 0 1

Index Scan using notifications_uuid_entityid on notifications n (cost=0.56..629,667.73 rows=1 width=110) (actual time=2,833.251..2,833.251 rows=0 loops=1)

  • Index Cond: (entity_id = c.id)
  • Filter: (notification_type_id = ANY ('{6,13}'::integer[]))
6. 0.000 0.000 ↓ 0.0 0

Index Scan using notifications_read_by_user on notifications_users nu (cost=0.43..8.16 rows=1 width=25) (never executed)

  • Index Cond: ((notification_id = n.id) AND (user_id = 29))
Planning time : 2.052 ms
Execution time : 2,833.425 ms