explain.depesz.com

PostgreSQL's explain analyze made readable

Result: bY1i

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

Unique (cost=37.59..37.67 rows=3 width=136) (actual time=0.184..0.188 rows=3 loops=1)

  • Buffers: shared hit=21
2. 0.007 0.186 ↓ 1.3 4 1

WindowAgg (cost=37.59..37.66 rows=3 width=136) (actual time=0.183..0.186 rows=4 loops=1)

  • Buffers: shared hit=21
3. 0.007 0.179 ↓ 1.3 4 1

Sort (cost=37.59..37.60 rows=3 width=136) (actual time=0.178..0.179 rows=4 loops=1)

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

WindowAgg (cost=37.51..37.56 rows=3 width=136) (actual time=0.169..0.172 rows=4 loops=1)

  • Buffers: shared hit=21
5. 0.009 0.158 ↓ 1.3 4 1

Sort (cost=37.51..37.52 rows=3 width=128) (actual time=0.158..0.158 rows=4 loops=1)

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

Nested Loop (cost=14.94..37.49 rows=3 width=128) (actual time=0.102..0.149 rows=4 loops=1)

  • Buffers: shared hit=21
7. 0.003 0.111 ↓ 8.0 16 1

Nested Loop Left Join (cost=14.79..29.49 rows=2 width=112) (actual time=0.077..0.111 rows=16 loops=1)

  • Buffers: shared hit=2
8. 0.035 0.076 ↓ 8.0 16 1

Hash Join (cost=14.65..29.08 rows=2 width=88) (actual time=0.066..0.076 rows=16 loops=1)

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

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

  • Buffers: shared hit=1
10. 0.006 0.020 ↓ 2.0 4 1

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

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

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

  • Filter: (fk_poll_id = 1)
  • Buffers: shared hit=1
12. 0.032 0.032 ↓ 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.002..0.002 rows=0 loops=16)

  • Index Cond: (id = pa.fk_image_content_id)
13. 0.032 0.032 ↓ 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.002..0.002 rows=0 loops=16)

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