explain.depesz.com

PostgreSQL's explain analyze made readable

Result: 8E9z

Settings
# exclusive inclusive rows x rows loops node
1. 0.074 166.291 ↓ 8.0 8 1

Unique (cost=8,441.11..8,441.16 rows=1 width=1,057) (actual time=166.216..166.291 rows=8 loops=1)

2. 0.208 166.217 ↓ 18.0 18 1

Sort (cost=8,441.11..8,441.11 rows=1 width=1,057) (actual time=166.214..166.217 rows=18 loops=1)

  • Sort Key: p.id, p.posttypeid, p.acceptedanswerid, p.parentid, p.creationdate, p.score, p.viewcount, p.body, p.owneruserid, p.ownerdisplayname, p.lasteditoruserid, p.lasteditordisplayname, p.lasteditdate, p.lastactivitydate, p.title, p.tags, p.answercount, p.commentcount, p.favoritecount, p.closeddate, p.communityowneddate
  • Sort Method: quicksort Memory: 49kB
3. 0.045 166.009 ↓ 18.0 18 1

Nested Loop (cost=7,860.03..8,441.10 rows=1 width=1,057) (actual time=85.766..166.009 rows=18 loops=1)

4. 3.140 165.892 ↓ 18.0 18 1

Hash Join (cost=7,859.74..8,440.59 rows=1 width=4) (actual time=85.735..165.892 rows=18 loops=1)

  • Hash Cond: (b.userid = u.id)
5. 83.279 87.726 ↓ 1.0 14,843 1

Bitmap Heap Scan on badges b (cost=102.01..629.73 rows=14,167 width=4) (actual time=4.655..87.726 rows=14,843 loops=1)

  • Recheck Cond: ((name ~ '^(?:Autobiographer)$'::text) OR (name ~ '^(?:Teacher)$'::text))
  • Filter: ((name ~ '^(?:Autobiographer)$'::text) OR (name ~ '^(?:Teacher)$'::text))
  • Heap Blocks: exact=454
6. 0.003 4.447 ↓ 0.0 0 1

BitmapOr (cost=102.01..102.01 rows=4,048 width=0) (actual time=4.447..4.447 rows=0 loops=1)

7. 3.051 3.051 ↓ 3.7 10,776 1

Bitmap Index Scan on badges_name_btree (cost=0.00..66.27 rows=2,931 width=0) (actual time=3.051..3.051 rows=10,776 loops=1)

  • Index Cond: (name = 'Autobiographer'::text)
8. 1.393 1.393 ↓ 3.6 4,067 1

Bitmap Index Scan on badges_name_btree (cost=0.00..28.65 rows=1,116 width=0) (actual time=1.393..1.393 rows=4,067 loops=1)

  • Index Cond: (name = 'Teacher'::text)
9. 0.015 75.026 ↓ 15.0 15 1

Hash (cost=7,757.72..7,757.72 rows=1 width=12) (actual time=75.026..75.026 rows=15 loops=1)

  • Buckets: 1024 Batches: 1 Memory Usage: 9kB
10. 12.959 75.011 ↓ 15.0 15 1

Hash Join (cost=1,443.83..7,757.72 rows=1 width=12) (actual time=33.198..75.011 rows=15 loops=1)

  • Hash Cond: ((h.userid = u.id) AND (h.userdisplayname = (u.displayname)::text))
11. 33.625 33.625 ↑ 1.0 66,528 1

Seq Scan on posthistory h (cost=0.00..5,964.16 rows=66,616 width=16) (actual time=0.092..33.625 rows=66,528 loops=1)

12. 14.180 28.427 ↑ 1.0 24,913 1

Hash (cost=1,070.13..1,070.13 rows=24,913 width=14) (actual time=28.427..28.427 rows=24,913 loops=1)

  • Buckets: 32768 Batches: 1 Memory Usage: 1384kB
13. 14.247 14.247 ↑ 1.0 24,913 1

Seq Scan on users u (cost=0.00..1,070.13 rows=24,913 width=14) (actual time=0.012..14.247 rows=24,913 loops=1)

14. 0.072 0.072 ↑ 1.0 1 18

Index Scan using posts_pkey on posts p (cost=0.29..0.50 rows=1 width=1,057) (actual time=0.004..0.004 rows=1 loops=18)

  • Index Cond: (id = h.postid)