explain.depesz.com

PostgreSQL's explain analyze made readable

Result: mtps

Settings
# exclusive inclusive rows x rows loops node
1. 0.004 3,611.190 ↑ 1.0 1 1

Limit (cost=166,300.60..166,300.60 rows=1 width=14) (actual time=3,611.188..3,611.190 rows=1 loops=1)

2. 148.424 3,611.186 ↑ 939,110.0 1 1

Sort (cost=166,300.60..168,648.38 rows=939,110 width=14) (actual time=3,611.186..3,611.186 rows=1 loops=1)

  • Sort Key: (count(*)) DESC
  • Sort Method: top-N heapsort Memory: 25kB
3. 395.899 3,462.762 ↓ 1.1 1,000,000 1

GroupAggregate (cost=143,880.70..161,605.05 rows=939,110 width=14) (actual time=2,386.864..3,462.762 rows=1,000,000 loops=1)

  • Group Key: year
4. 2,910.808 3,066.863 ↑ 1.0 1,111,100 1

Sort (cost=143,880.70..146,658.45 rows=1,111,100 width=6) (actual time=2,386.852..3,066.863 rows=1,111,100 loops=1)

  • Sort Key: year
  • Sort Method: external merge Disk: 18,304kB
5. 156.055 156.055 ↑ 1.0 1,111,100 1

Seq Scan on test_g (cost=0.00..17,113.00 rows=1,111,100 width=6) (actual time=0.017..156.055 rows=1,111,100 loops=1)

Planning time : 0.125 ms
Execution time : 3,616.662 ms