explain.depesz.com

PostgreSQL's explain analyze made readable

Result: 1bn7

Settings
# exclusive inclusive rows x rows loops node
1. 0.059 1,551.645 ↑ 1.0 100 1

Limit (cost=105,355.84..105,356.09 rows=100 width=22) (actual time=1,551.606..1,551.645 rows=100 loops=1)

2. 168.804 1,551.586 ↑ 1,441.6 500 1

Sort (cost=105,354.84..107,156.83 rows=720,795 width=22) (actual time=1,551.506..1,551.586 rows=500 loops=1)

  • Sort Key: herald_activity."timestamp" DESC, herald_notification.id DESC
  • Sort Method: top-N heapsort Memory: 64kB
3. 570.356 1,382.782 ↑ 1.0 720,795 1

Hash Join (cost=36,089.53..69,438.41 rows=720,795 width=22) (actual time=592.391..1,382.782 rows=720,795 loops=1)

  • Hash Cond: (herald_notification.activity_id = herald_activity.id)
4. 220.816 220.816 ↑ 1.0 720,795 1

Seq Scan on herald_notification (cost=0.00..11,799.95 rows=720,795 width=14) (actual time=0.012..220.816 rows=720,795 loops=1)

5. 361.200 591.610 ↑ 1.0 941,490 1

Hash (cost=19,722.90..19,722.90 rows=941,490 width=12) (actual time=591.610..591.610 rows=941,490 loops=1)

  • Buckets: 131072 Batches: 16 Memory Usage: 3566kB
6. 230.410 230.410 ↑ 1.0 941,490 1

Seq Scan on herald_activity (cost=0.00..19,722.90 rows=941,490 width=12) (actual time=0.013..230.410 rows=941,490 loops=1)

Planning time : 1.400 ms
Execution time : 1,552.016 ms