explain.depesz.com

PostgreSQL's explain analyze made readable

Result: ByNb

Settings
# exclusive inclusive rows x rows loops node
1. 0.058 4.291 ↑ 201.7 3 1

Sort (cost=309.37..310.89 rows=605 width=249) (actual time=4.290..4.291 rows=3 loops=1)

  • Sort Key: trivia.category
  • Sort Method: quicksort Memory: 25kB
2. 0.035 4.233 ↑ 201.7 3 1

Hash Join (cost=245.52..281.42 rows=605 width=249) (actual time=4.228..4.233 rows=3 loops=1)

  • Hash Cond: (answers.user_id = users.id)
3. 0.040 4.164 ↑ 201.7 3 1

Hash Join (cost=244.50..268.19 rows=605 width=137) (actual time=4.162..4.164 rows=3 loops=1)

  • Hash Cond: (answers.trivia_id = trivia.id)
4. 0.012 0.012 ↑ 201.7 3 1

Seq Scan on answers (cost=0.00..22.10 rows=605 width=37) (actual time=0.010..0.012 rows=3 loops=1)

  • Filter: answered_correctly
  • Rows Removed by Filter: 7
5. 1.502 4.112 ↓ 1.0 5,010 1

Hash (cost=182.00..182.00 rows=5,000 width=104) (actual time=4.112..4.112 rows=5,010 loops=1)

  • Buckets: 8,192 Batches: 1 Memory Usage: 743kB
6. 2.610 2.610 ↓ 1.0 5,010 1

Seq Scan on trivia (cost=0.00..182.00 rows=5,000 width=104) (actual time=0.043..2.610 rows=5,010 loops=1)

7. 0.015 0.034 ↑ 1.0 1 1

Hash (cost=1.01..1.01 rows=1 width=66) (actual time=0.034..0.034 rows=1 loops=1)

  • Buckets: 1,024 Batches: 1 Memory Usage: 9kB
8. 0.019 0.019 ↑ 1.0 1 1

Seq Scan on users (cost=0.00..1.01 rows=1 width=66) (actual time=0.019..0.019 rows=1 loops=1)