explain.depesz.com

PostgreSQL's explain analyze made readable

Result: EcGQ

Settings

Optimization(s) for this plan:

# exclusive inclusive rows x rows loops node
1. 0.032 1.001 ↓ 19.0 19 1

Sort (cost=109,188.27..109,188.27 rows=1 width=734) (actual time=1.000..1.001 rows=19 loops=1)

  • Sort Key: questions.updated_at, questions.id
  • Sort Method: quicksort Memory: 30kB
2. 0.000 0.969 ↓ 19.0 19 1

Nested Loop Semi Join (cost=1.00..109,188.26 rows=1 width=734) (actual time=0.161..0.969 rows=19 loops=1)

3. 0.230 0.230 ↓ 2.8 250 1

Index Scan using idx_questions_student_id on questions (cost=0.56..988.70 rows=90 width=734) (actual time=0.033..0.230 rows=250 loops=1)

  • Index Cond: (student_id = '5d2a0c1381cd54000103ceaa'::text)
  • Filter: ((deleted_at IS NULL) AND has_revised AND (subject_id = '20'::text))
  • Rows Removed by Filter: 4
4. 0.750 0.750 ↓ 0.0 0 250

Index Scan using idx_knowledges_question_id on knowledges (cost=0.44..2,368.08 rows=2 width=4) (actual time=0.003..0.003 rows=0 loops=250)

  • Index Cond: (question_id = questions.id)
  • Filter: (tk_id = ANY ('{11254,5576,11187,5444,15684,11088,5309,15513,5403,34885}'::integer[]))
  • Rows Removed by Filter: 2