explain.depesz.com

PostgreSQL's explain analyze made readable

Result: vlm6

Settings
# exclusive inclusive rows x rows loops node
1. 0.002 0.050 ↓ 0.0 0 1

HashAggregate (cost=1,117.85..1,128.30 rows=1,045 width=16) (actual time=0.050..0.050 rows=0 loops=1)

  • Group Key: submissions.assignment_id, submissions.user_id
2.          

CTE assignment_batch

3. 0.012 0.012 ↑ 1.0 1 1

Result (cost=0.00..0.01 rows=1 width=0) (actual time=0.012..0.012 rows=1 loops=1)

4. 0.000 0.048 ↓ 0.0 0 1

Append (cost=0.58..1,112.61 rows=1,045 width=16) (actual time=0.048..0.048 rows=0 loops=1)

5. 0.002 0.042 ↓ 0.0 0 1

Result (cost=0.58..11.81 rows=8 width=16) (actual time=0.042..0.042 rows=0 loops=1)

  • One-Time Filter: (now() > '2019-10-03 16:50:20+00'::timestamp with time zone)
6. 0.004 0.040 ↓ 0.0 0 1

Nested Loop (cost=0.58..11.81 rows=8 width=16) (actual time=0.040..0.040 rows=0 loops=1)

7. 0.022 0.022 ↑ 1.0 1 1

CTE Scan on assignment_batch (cost=0.00..0.02 rows=1 width=4) (actual time=0.022..0.022 rows=1 loops=1)

8. 0.014 0.014 ↓ 0.0 0 1

Index Scan using rosser_cowboy_submissions_assignment_id_by_grading_period on submissions (cost=0.57..11.71 rows=8 width=16) (actual time=0.014..0.014 rows=0 loops=1)

  • Index Cond: ((assignment_id = assignment_batch.assignment_id) AND (grading_period_id = ANY ('{348,349}'::bigint[])))
9. 0.001 0.006 ↓ 0.0 0 1

Result (cost=0.58..1,090.35 rows=1,037 width=16) (actual time=0.006..0.006 rows=0 loops=1)

  • One-Time Filter: (now() > '2019-10-03 16:50:20+00'::timestamp with time zone)
10. 0.000 0.005 ↓ 0.0 0 1

Nested Loop (cost=0.58..1,090.35 rows=1,037 width=16) (actual time=0.005..0.005 rows=0 loops=1)

11. 0.002 0.002 ↑ 1.0 1 1

CTE Scan on assignment_batch assignment_batch_1 (cost=0.00..0.02 rows=1 width=4) (actual time=0.002..0.002 rows=1 loops=1)

12. 0.003 0.003 ↓ 0.0 0 1

Index Scan using rosser_cowboy_submissions_assignment_id_by_grading_period on submissions submissions_1 (cost=0.57..1,079.96 rows=1,037 width=16) (actual time=0.003..0.003 rows=0 loops=1)

  • Index Cond: ((assignment_id = assignment_batch_1.assignment_id) AND (grading_period_id IS NULL))
Planning time : 1.846 ms
Execution time : 0.416 ms