explain.depesz.com

PostgreSQL's explain analyze made readable

Result: maJI

Settings
# exclusive inclusive rows x rows loops node
1. 0.002 0.265 ↑ 1.0 3 1

Unique (cost=37.69..37.71 rows=3 width=144) (actual time=0.263..0.265 rows=3 loops=1)

  • Buffers: shared hit=21
2. 0.018 0.263 ↓ 1.3 4 1

Sort (cost=37.69..37.69 rows=3 width=144) (actual time=0.262..0.263 rows=4 loops=1)

  • Sort Key: pq.id, pa.id
  • Sort Method: quicksort Memory: 25kB
  • Buffers: shared hit=21
3. 0.010 0.245 ↓ 1.3 4 1

WindowAgg (cost=37.59..37.66 rows=3 width=144) (actual time=0.241..0.245 rows=4 loops=1)

  • Buffers: shared hit=21
4. 0.006 0.235 ↓ 1.3 4 1

Sort (cost=37.59..37.60 rows=3 width=144) (actual time=0.234..0.235 rows=4 loops=1)

  • Sort Key: pr.fk_poll_answer_id
  • Sort Method: quicksort Memory: 25kB
  • Buffers: shared hit=21
5. 0.020 0.229 ↓ 1.3 4 1

WindowAgg (cost=37.51..37.56 rows=3 width=144) (actual time=0.225..0.229 rows=4 loops=1)

  • Buffers: shared hit=21
6. 0.011 0.209 ↓ 1.3 4 1

Sort (cost=37.51..37.52 rows=3 width=136) (actual time=0.208..0.209 rows=4 loops=1)

  • Sort Key: pa.fk_poll_question_id
  • Sort Method: quicksort Memory: 25kB
  • Buffers: shared hit=21
7. 0.006 0.198 ↓ 1.3 4 1

Nested Loop (cost=14.94..37.49 rows=3 width=136) (actual time=0.146..0.198 rows=4 loops=1)

  • Buffers: shared hit=21
8. 0.012 0.144 ↓ 8.0 16 1

Nested Loop Left Join (cost=14.79..29.49 rows=2 width=120) (actual time=0.112..0.144 rows=16 loops=1)

  • Buffers: shared hit=2
9. 0.034 0.116 ↓ 8.0 16 1

Hash Join (cost=14.65..29.08 rows=2 width=96) (actual time=0.099..0.116 rows=16 loops=1)

  • Hash Cond: (pa.fk_poll_question_id = pq.id)
  • Buffers: shared hit=2
10. 0.057 0.057 ↑ 21.9 16 1

Seq Scan on poll_answer pa (cost=0.00..13.50 rows=350 width=88) (actual time=0.053..0.057 rows=16 loops=1)

  • Buffers: shared hit=1
11. 0.006 0.025 ↓ 2.0 4 1

Hash (cost=14.62..14.62 rows=2 width=8) (actual time=0.025..0.025 rows=4 loops=1)

  • Buckets: 1,024 Batches: 1 Memory Usage: 9kB
  • Buffers: shared hit=1
12. 0.019 0.019 ↓ 2.0 4 1

Seq Scan on poll_question pq (cost=0.00..14.62 rows=2 width=8) (actual time=0.016..0.019 rows=4 loops=1)

  • Filter: (fk_poll_id = 1)
  • Buffers: shared hit=1
13. 0.016 0.016 ↓ 0.0 0 16

Index Scan using binary_content_pkey on binary_content bc (cost=0.14..0.20 rows=1 width=40) (actual time=0.001..0.001 rows=0 loops=16)

  • Index Cond: (id = pa.fk_image_content_id)
14. 0.048 0.048 ↓ 0.0 0 16

Index Only Scan using uk_poll_result_attendee_id_answer_id on poll_result pr (cost=0.15..3.98 rows=2 width=16) (actual time=0.003..0.003 rows=0 loops=16)

  • Index Cond: (fk_poll_answer_id = pa.id)
  • Heap Fetches: 4
  • Buffers: shared hit=19
Planning time : 1.010 ms
Execution time : 0.482 ms