explain.depesz.com

PostgreSQL's explain analyze made readable

Result: Usyx

Settings
# exclusive inclusive rows x rows loops node
1. 4.255 1,546.167 ↑ 1.0 2 1

Limit (cost=1,001.46..2,827.53 rows=2 width=292) (actual time=1,541.829..1,546.167 rows=2 loops=1)

2. 0.000 1,541.912 ↑ 132.0 2 1

Nested Loop (cost=1,001.46..242,042.66 rows=264 width=292) (actual time=1,541.827..1,541.912 rows=2 loops=1)

3. 522.580 1,546.063 ↑ 132.0 2 1

Gather Merge (cost=1,001.17..242,031.05 rows=264 width=189) (actual time=1,541.734..1,546.063 rows=2 loops=1)

  • Workers Planned: 2
  • Workers Launched: 2
4. 0.003 1,023.483 ↑ 110.0 1 3 / 3

Nested Loop (cost=1.14..241,000.56 rows=110 width=189) (actual time=1,023.456..1,023.483 rows=1 loops=3)

5. 211.103 1,023.474 ↑ 110.0 1 3 / 3

Nested Loop (cost=0.85..240,966.38 rows=110 width=86) (actual time=1,023.449..1,023.474 rows=1 loops=3)

6. 195.016 195.016 ↑ 1.2 308,678 3 / 3

Parallel Index Scan Backward using herald_activity_timestamp_574bae7d on herald_activity (cost=0.42..44,554.07 rows=385,804 width=72) (actual time=0.036..195.016 rows=308,678 loops=3)

  • Filter: active
  • Rows Removed by Filter: 14746
7. 617.355 617.355 ↓ 0.0 0 926,033 / 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,033)

  • Index Cond: ((activity_id = herald_activity.id) AND (user_id = 8008))
8. 0.006 0.006 ↑ 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.009..0.009 rows=1 loops=2)

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

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

10. 0.048 0.048 ↑ 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.047..0.048 rows=1 loops=1)

  • Index Cond: (id = 8008)
Planning time : 2.943 ms
Execution time : 1,546.441 ms