explain.depesz.com

PostgreSQL's explain analyze made readable

Result: pPrV

Settings
# exclusive inclusive rows x rows loops node
1. 0.005 34,690.934 ↑ 1.0 1 1

Aggregate (cost=4,722,618.61..4,722,618.62 rows=1 width=8) (actual time=34,690.933..34,690.934 rows=1 loops=1)

2. 31.005 34,690.929 ↓ 0.0 0 1

Seq Scan on post (cost=0.00..4,722,618.48 rows=54 width=0) (actual time=34,690.929..34,690.929 rows=0 loops=1)

  • Filter: ((SubPlan 1) = 'naver40202690'::text)
  • Rows Removed by Filter: 10,838
3.          

SubPlan (for Seq Scan)

4. 10.838 34,659.924 ↓ 0.0 0 10,838

Limit (cost=0.28..435.70 rows=1 width=24) (actual time=3.198..3.198 rows=0 loops=10,838)

5. 34,649.086 34,649.086 ↓ 0.0 0 10,838

Index Scan Backward using "ix_comment_createdAt" on comment (cost=0.28..871.11 rows=2 width=24) (actual time=3.197..3.197 rows=0 loops=10,838)

  • Filter: ("postId" = post._id)
  • Rows Removed by Filter: 4,355