explain.depesz.com

PostgreSQL's explain analyze made readable

Result: jQRM

Settings
# exclusive inclusive rows x rows loops node
1. 3,799.964 28,621.334 ↓ 79.0 2,179,072 1

Sort (cost=3,626,444.85..3,626,513.77 rows=27,567 width=353) (actual time=27,734.111..28,621.334 rows=2,179,072 loops=1)

  • Sort Key: bs.id
  • Sort Method: external sort Disk: 363016kB
2. 2,680.869 24,821.370 ↓ 79.0 2,179,072 1

Subquery Scan on bs (cost=3,440,752.16..3,619,935.19 rows=27,567 width=353) (actual time=11,267.719..24,821.370 rows=2,179,072 loops=1)

  • Filter: (bs.rank = 1)
  • Rows Removed by Filter: 3325952
3. 8,385.528 22,140.501 ↑ 1.0 5,505,024 1

WindowAgg (cost=3,440,752.16..3,551,018.64 rows=5,513,324 width=353) (actual time=11,267.717..22,140.501 rows=5,505,024 loops=1)

4. 10,514.764 13,754.973 ↑ 1.0 5,505,024 1

Sort (cost=3,440,752.16..3,454,535.47 rows=5,513,324 width=345) (actual time=11,267.709..13,754.973 rows=5,505,024 loops=1)

  • Sort Key: b.post_id, b.change_time
  • Sort Method: external sort Disk: 1009664kB
5. 3,240.209 3,240.209 ↑ 1.0 5,505,024 1

Seq Scan on forum_post_history_backup b (cost=0.00..194,621.24 rows=5,513,324 width=345) (actual time=0.014..3,240.209 rows=5,505,024 loops=1)