explain.depesz.com

PostgreSQL's explain analyze made readable

Result: 6DVP

Settings
# exclusive inclusive rows x rows loops node
1. 22,739.883 113,044.340 ↑ 1.0 16,775,026 1

WindowAgg (cost=6,231,353.63..6,567,423.71 rows=16,803,504 width=32) (actual time=83,583.884..113,044.340 rows=16,775,026 loops=1)

2. 29,255.362 90,304.457 ↑ 1.0 16,775,026 1

Sort (cost=6,231,353.63..6,273,362.39 rows=16,803,504 width=24) (actual time=83,583.877..90,304.457 rows=16,775,026 loops=1)

  • Sort Key: post_id, change_time
  • Sort Method: external sort Disk: 557528kB
3. 23,074.876 61,049.095 ↑ 1.0 16,775,026 1

WindowAgg (cost=3,189,460.30..3,525,530.38 rows=16,803,504 width=24) (actual time=30,151.527..61,049.095 rows=16,775,026 loops=1)

4. 25,260.168 37,974.219 ↑ 1.0 16,775,026 1

Sort (cost=3,189,460.30..3,231,469.06 rows=16,803,504 width=16) (actual time=30,151.520..37,974.219 rows=16,775,026 loops=1)

  • Sort Key: post_id, change_time DESC
  • Sort Method: external merge Disk: 426432kB
5. 12,714.051 12,714.051 ↑ 1.0 16,775,026 1

Seq Scan on forum_post_history_backup (cost=0.00..598,507.04 rows=16,803,504 width=16) (actual time=0.446..12,714.051 rows=16,775,026 loops=1)

Planning time : 0.120 ms
Execution time : 118,844.260 ms