explain.depesz.com

PostgreSQL's explain analyze made readable

Result: U8Ir

Settings
# exclusive inclusive rows x rows loops node
1. 0.004 0.241 ↑ 1.0 3 1

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

2. 0.032 0.237 ↓ 1.3 4 1

Sort (cost=37.69..37.69 rows=3 width=136) (actual time=0.237..0.237 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
3. 0.009 0.205 ↓ 1.3 4 1

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

4. 0.006 0.196 ↓ 1.3 4 1

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

  • Sort Key: pr.fk_poll_answer_id
  • Sort Method: quicksort Memory: 25kB
5. 0.019 0.190 ↓ 1.3 4 1

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

6. 0.009 0.171 ↓ 1.3 4 1

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

  • Sort Key: pa.fk_poll_question_id
  • Sort Method: quicksort Memory: 25kB
7. 0.003 0.162 ↓ 1.3 4 1

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

8. 0.011 0.111 ↓ 8.0 16 1

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

9. 0.032 0.084 ↓ 8.0 16 1

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

  • Hash Cond: (pa.fk_poll_question_id = pq.id)
10. 0.029 0.029 ↑ 21.9 16 1

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

11. 0.007 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
12. 0.016 0.016 ↓ 2.0 4 1

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

  • Filter: (fk_poll_id = 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.002..0.003 rows=0 loops=16)

  • Index Cond: (fk_poll_answer_id = pa.id)
  • Heap Fetches: 4
Planning time : 0.849 ms
Execution time : 0.487 ms