explain.depesz.com

PostgreSQL's explain analyze made readable

Result: KY9O

Settings
# exclusive inclusive rows x rows loops node
1. 0.000 0.000 ↓ 0.0

Nested Loop Anti Join (cost=170.71..5,682.96 rows=1 width=704) (actual rows= loops=)

2. 0.000 0.000 ↓ 0.0

Hash Join (cost=170.55..5,664.19 rows=1 width=704) (actual rows= loops=)

  • Hash Cond: (containers.id = publications.container_id)
3. 0.000 0.000 ↓ 0.0

Nested Loop (cost=153.83..5,646.23 rows=330 width=610) (actual rows= loops=)

4. 0.000 0.000 ↓ 0.0

Hash Join (cost=153.41..5,480.39 rows=330 width=4) (actual rows= loops=)

  • Hash Cond: (op.invoice_id = orders.invoice_id)
5. 0.000 0.000 ↓ 0.0

Seq Scan on order_publications op (cost=0.00..4,709.90 rows=163,690 width=8) (actual rows= loops=)

6. 0.000 0.000 ↓ 0.0

Hash (cost=153.21..153.21 rows=16 width=4) (actual rows= loops=)

7. 0.000 0.000 ↓ 0.0

Nested Loop (cost=1.58..153.21 rows=16 width=4) (actual rows= loops=)

8. 0.000 0.000 ↓ 0.0

Nested Loop (cost=1.29..144.57 rows=10 width=4) (actual rows= loops=)

9. 0.000 0.000 ↓ 0.0

Nested Loop (cost=0.86..132.56 rows=10 width=4) (actual rows= loops=)

10. 0.000 0.000 ↓ 0.0

Index Scan using student_classroom_lookup_student_id_idx on student_classroom_lookup scl (cost=0.43..48.03 rows=10 width=4) (actual rows= loops=)

  • Index Cond: (student_id = 5335472)
  • Filter: (active = 1)
11. 0.000 0.000 ↓ 0.0

Index Scan using teacher_classroom_lookup_class_id_idx on teacher_classroom_lookup tcl (cost=0.42..8.44 rows=1 width=8) (actual rows= loops=)

  • Index Cond: (class_id = scl.class_id)
12. 0.000 0.000 ↓ 0.0

Index Scan using users_pkey on users teacher (cost=0.43..1.19 rows=1 width=8) (actual rows= loops=)

  • Index Cond: (id = tcl.teacher_id)
13. 0.000 0.000 ↓ 0.0

Index Scan using orders_ed_org_id on orders (cost=0.29..0.83 rows=3 width=8) (actual rows= loops=)

  • Index Cond: (ed_org_id = teacher.ed_org_id)
  • Filter: (end_datetime > now())
14. 0.000 0.000 ↓ 0.0

Index Scan using container_pkey on containers (cost=0.42..0.49 rows=1 width=606) (actual rows= loops=)

  • Index Cond: (id = op.publication_id)
15. 0.000 0.000 ↓ 0.0

Hash (cost=11.32..11.32 rows=432 width=98) (actual rows= loops=)

16. 0.000 0.000 ↓ 0.0

Seq Scan on publications (cost=0.00..11.32 rows=432 width=98) (actual rows= loops=)

17. 0.000 0.000 ↓ 0.0

Index Only Scan using classroom_publication_blacklist_classroom_id_publication_id_idx on classroom_publication_blacklist cpb (cost=0.15..17.22 rows=11 width=4) (actual rows= loops=)

  • Index Cond: (publication_id = containers.id)