explain.depesz.com

PostgreSQL's explain analyze made readable

Result: EQvr

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

GroupAggregate (cost=11,906.76..11,935.02 rows=2 width=1,105) (actual rows= loops=)

  • Group Key: place_supervision.id, region.id
2. 0.000 0.000 ↓ 0.0

Sort (cost=11,906.76..11,906.77 rows=2 width=1,074) (actual rows= loops=)

  • Sort Key: place_supervision.id, region.id
3. 0.000 0.000 ↓ 0.0

Nested Loop Left Join (cost=421.36..11,906.75 rows=2 width=1,074) (actual rows= loops=)

4. 0.000 0.000 ↓ 0.0

Nested Loop Left Join (cost=420.94..11,905.27 rows=2 width=1,070) (actual rows= loops=)

  • Join Filter: (auditorium.id = place_supervision.place_id)
5. 0.000 0.000 ↓ 0.0

Nested Loop (cost=420.65..11,885.48 rows=3 width=992) (actual rows= loops=)

6. 0.000 0.000 ↓ 0.0

Hash Join (cost=420.22..11,870.06 rows=2 width=1,011) (actual rows= loops=)

  • Hash Cond: ((point.ancestry)::integer = region.id)
7. 0.000 0.000 ↓ 0.0

Bitmap Heap Scan on places point (cost=174.88..11,580.09 rows=7,137 width=24) (actual rows= loops=)

  • Recheck Cond: ((ege_place_type)::text = 'ppe'::text)
  • Filter: is_active
8. 0.000 0.000 ↓ 0.0

Bitmap Index Scan on index_places_on_ege_place_type (cost=0.00..173.10 rows=8,624 width=0) (actual rows= loops=)

  • Index Cond: ((ege_place_type)::text = 'ppe'::text)
9. 0.000 0.000 ↓ 0.0

Hash (cost=244.45..244.45 rows=71 width=987) (actual rows= loops=)

10. 0.000 0.000 ↓ 0.0

Index Scan using index_places_on_ege_place_type on places region (cost=0.42..244.45 rows=71 width=987) (actual rows= loops=)

  • Index Cond: ((ege_place_type)::text = 'region'::text)
  • Filter: is_active
11. 0.000 0.000 ↓ 0.0

Index Scan using index_places_on_ancestry_varchar_ops on places auditorium (cost=0.43..7.70 rows=1 width=25) (actual rows= loops=)

  • Index Cond: ((ancestry)::text = (((point.ancestry)::text || '/'::text) || (point.id)::text))
  • Filter: (is_active AND ((ege_place_type)::text = 'auditorium'::text))
12. 0.000 0.000 ↓ 0.0

Materialize (cost=0.29..19.74 rows=1 width=78) (actual rows= loops=)

13. 0.000 0.000 ↓ 0.0

Nested Loop (cost=0.29..19.74 rows=1 width=78) (actual rows= loops=)

14. 0.000 0.000 ↓ 0.0

Seq Scan on place_supervision_logs place_supervision (cost=0.00..11.40 rows=1 width=78) (actual rows= loops=)

  • Filter: ((total_viewed_seconds > 0) AND (exam_date = '2020-04-03'::date))
15. 0.000 0.000 ↓ 0.0

Index Only Scan using index_users_on_id_and_user_group_id on users supervision_user (cost=0.29..8.33 rows=1 width=4) (actual rows= loops=)

  • Index Cond: (id = place_supervision.user_id)
  • Filter: (user_group_id = ANY ('{19,26,20,1,161,188,24,59,7,180,201,175,198,190,203,189,208}'::integer[]))
16. 0.000 0.000 ↓ 0.0

Index Scan using index_schedules_on_place_id_and_broadcast_hidden on schedules schedule (cost=0.42..0.73 rows=1 width=8) (actual rows= loops=)

  • Index Cond: (auditorium.id = place_id)
  • Filter: (has_live AND (date = '2020-04-03'::date))
17.          

SubPlan (for GroupAggregate)

18. 0.000 0.000 ↓ 0.0

Seq Scan on place_supervision_logs f2 (cost=0.00..14.10 rows=1 width=0) (actual rows= loops=)

  • Filter: ((id <> place_supervision.id) AND (user_id = place_supervision.user_id) AND (tsrange(start_time, end_time, '[]'::text) && tsrange(place_supervision.start_time, place_supervision.end_time, '[]'::text)))