explain.depesz.com

PostgreSQL's explain analyze made readable

Result: ogHS

Settings
# exclusive inclusive rows x rows loops node
1. 0.139 0.882 ↑ 1.0 3 1

Sort (cost=61.69..61.70 rows=3 width=524) (actual time=0.881..0.882 rows=3 loops=1)

  • Sort Key: pc.comment_count DESC
  • Sort Method: quicksort Memory: 25kB
2. 0.016 0.743 ↑ 1.0 3 1

Hash Join (cost=49.71..61.67 rows=3 width=524) (actual time=0.742..0.743 rows=3 loops=1)

  • Hash Cond: (p.id = pc.post_id)
3. 0.030 0.030 ↑ 23.3 6 1

Seq Scan on post p (cost=0.00..11.40 rows=140 width=520) (actual time=0.030..0.030 rows=6 loops=1)

4. 0.010 0.697 ↑ 1.0 3 1

Hash (cost=49.68..49.68 rows=3 width=12) (actual time=0.697..0.697 rows=3 loops=1)

  • Buckets: 1024 Batches: 1 Memory Usage: 9kB
5. 0.001 0.687 ↑ 1.0 3 1

Subquery Scan on pc (cost=49.64..49.68 rows=3 width=12) (actual time=0.686..0.687 rows=3 loops=1)

6. 0.001 0.686 ↑ 1.0 3 1

Limit (cost=49.64..49.65 rows=3 width=12) (actual time=0.685..0.686 rows=3 loops=1)

7. 0.015 0.685 ↑ 2.0 3 1

Sort (cost=49.64..49.65 rows=6 width=12) (actual time=0.685..0.685 rows=3 loops=1)

  • Sort Key: (count(*)) DESC
  • Sort Method: quicksort Memory: 25kB
8. 0.346 0.670 ↑ 1.0 6 1

HashAggregate (cost=49.50..49.56 rows=6 width=12) (actual time=0.668..0.670 rows=6 loops=1)

  • Group Key: post_comment.post_id
9. 0.324 0.324 ↑ 1.0 2,100 1

Seq Scan on post_comment (cost=0.00..39.00 rows=2,100 width=4) (actual time=0.033..0.324 rows=2,100 loops=1)

Planning time : 1.895 ms
Execution time : 1.013 ms