explain.depesz.com

PostgreSQL's explain analyze made readable

Result: yZD6

Settings
# exclusive inclusive rows x rows loops node
1. 157.721 635.579 ↓ 1.9 13,431 1

HashAggregate (cost=1,467.02..1,488.20 rows=7,059 width=4) (actual time=633.837..635.579 rows=13,431 loops=1)

  • Group Key: ""user"".id
2. 74.945 477.858 ↓ 125.6 886,446 1

Nested Loop (cost=712.08..1,463.49 rows=7,059 width=4) (actual time=4.600..477.858 rows=886,446 loops=1)

3. 0.063 0.115 ↓ 66.0 66 1

Hash Join (cost=6.25..7.48 rows=1 width=4) (actual time=0.037..0.115 rows=66 loops=1)

  • Hash Cond: (quiz_concept_question.quiz_concept_id = quiz_concept.id)
4. 0.033 0.033 ↑ 1.0 66 1

Seq Scan on quiz_concept_question (cost=0.00..1.20 rows=66 width=4) (actual time=0.007..0.033 rows=66 loops=1)

5. 0.006 0.019 ↓ 5.0 5 1

Hash (cost=6.24..6.24 rows=1 width=8) (actual time=0.019..0.019 rows=5 loops=1)

  • Buckets: 1,024 Batches: 1 Memory Usage: 9kB
6. 0.013 0.013 ↓ 5.0 5 1

Index Scan using quiz_concept_name_lesson_program_id on quiz_concept (cost=0.03..6.24 rows=1 width=8) (actual time=0.011..0.013 rows=5 loops=1)

  • Index Cond: (lesson_program_id = 1)
7. 187.324 402.798 ↑ 1.1 13,431 66

Hash Join (cost=705.84..1,411.09 rows=14,973 width=8) (actual time=0.074..6.103 rows=13,431 loops=66)

  • Hash Cond: (license.user_id = ""user"".id)
8. 211.002 211.002 ↓ 1.0 15,250 66

Index Only Scan using license_user_id_lesson_program_id_active on license (cost=0.06..697.45 rows=14,973 width=8) (actual time=0.005..3.197 rows=15,250 loops=66)

  • Index Cond: (lesson_program_id = 1)
  • Heap Fetches: 251,922
9. 2.026 4.472 ↓ 1.0 13,458 1

Hash (cost=659.59..659.59 rows=13,197 width=4) (actual time=4.472..4.472 rows=13,458 loops=1)

  • Buckets: 16,384 Batches: 1 Memory Usage: 602kB
10. 2.446 2.446 ↓ 1.0 13,458 1

Seq Scan on ""user"" (cost=0.00..659.59 rows=13,197 width=4) (actual time=0.004..2.446 rows=13,458 loops=1)

Planning time : 0.413 ms
Execution time : 636.292 ms