explain.depesz.com

PostgreSQL's explain analyze made readable

Result: 7h4l

Settings
# exclusive inclusive rows x rows loops node
1. 0.005 0.233 ↑ 1.0 3 1

Unique (cost=37.69..37.74 rows=3 width=136) (actual time=0.229..0.233 rows=3 loops=1)

  • Buffers: shared hit=21
2. 0.021 0.228 ↓ 1.3 4 1

Sort (cost=37.69..37.69 rows=3 width=136) (actual time=0.228..0.228 rows=4 loops=1)

  • Sort Key: pa.id, pa.answer_number, pa.answer_text, bc.store_url, (count(pr.poll_attendee_id) OVER (?)), (((count(pr.poll_attendee_id) OVER (?))::double precision / ((count(pr.poll_attendee_id) OVER (?)))::double precision))
  • Sort Method: quicksort Memory: 25kB
  • Buffers: shared hit=21
3. 0.009 0.207 ↓ 1.3 4 1

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

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

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

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

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

  • Buffers: shared hit=21
6. 0.012 0.173 ↓ 1.3 4 1

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

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

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

  • Buffers: shared hit=21
8. 0.009 0.106 ↓ 8.0 16 1

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

  • Buffers: shared hit=2
9. 0.028 0.081 ↓ 8.0 16 1

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

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

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

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

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

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

Seq Scan on poll_question pq (cost=0.00..14.62 rows=2 width=8) (actual time=0.015..0.017 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 : 0.911 ms
Execution time : 0.438 ms