explain.depesz.com

PostgreSQL's explain analyze made readable

Result: FKQf

Settings
# exclusive inclusive rows x rows loops node
1. 5.463 1,448.711 ↑ 1.0 2 1

Limit (cost=1,001.46..2,741.76 rows=2 width=292) (actual time=1,443.222..1,448.711 rows=2 loops=1)

2. 0.000 1,443.248 ↑ 139.5 2 1

Nested Loop (cost=1,001.46..243,774.44 rows=279 width=292) (actual time=1,443.221..1,443.248 rows=2 loops=1)

3. 490.762 1,448.618 ↑ 139.5 2 1

Gather Merge (cost=1,001.17..243,762.65 rows=279 width=189) (actual time=1,443.138..1,448.618 rows=2 loops=1)

  • Workers Planned: 2
  • Workers Launched: 2
4. 0.003 957.856 ↑ 116.0 1 3 / 3

Nested Loop (cost=1.14..242,730.42 rows=116 width=189) (actual time=957.848..957.856 rows=1 loops=3)

5. 151.216 957.848 ↑ 116.0 1 3 / 3

Nested Loop (cost=0.85..242,694.38 rows=116 width=86) (actual time=957.843..957.848 rows=1 loops=3)

6. 188.833 188.833 ↑ 1.2 308,900 3 / 3

Parallel Index Scan Backward using herald_activity_timestamp_574bae7d on herald_activity (cost=0.42..44,196.92 rows=385,566 width=72) (actual time=0.028..188.833 rows=308,900 loops=3)

  • Filter: active
  • Rows Removed by Filter: 14813
7. 617.799 617.799 ↓ 0.0 0 926,699 / 3

Index Scan using unique_user_and_activity on herald_notification (cost=0.43..0.51 rows=1 width=14) (actual time=0.002..0.002 rows=0 loops=926,699)

  • Index Cond: ((activity_id = herald_activity.id) AND (user_id = 8008))
8. 0.005 0.005 ↑ 1.0 1 2 / 3

Index Scan using herald_user_pkey on herald_user t4 (cost=0.29..0.31 rows=1 width=103) (actual time=0.008..0.008 rows=1 loops=2)

  • Index Cond: (id = herald_activity.actor_id)
9. 0.033 0.082 ↑ 1.0 1 2

Materialize (cost=0.29..8.31 rows=1 width=103) (actual time=0.040..0.041 rows=1 loops=2)

10. 0.049 0.049 ↑ 1.0 1 1

Index Scan using herald_user_pkey on herald_user (cost=0.29..8.31 rows=1 width=103) (actual time=0.048..0.049 rows=1 loops=1)

  • Index Cond: (id = 8008)
Planning time : 2.737 ms
Execution time : 1,448.927 ms