explain.depesz.com

PostgreSQL's explain analyze made readable

Result: WylM

Settings
# exclusive inclusive rows x rows loops node
1. 2.059 2,112.027 ↓ 42.0 42 1

GroupAggregate (cost=856.85..2,091.06 rows=1 width=311) (actual time=2,075.545..2,112.027 rows=42 loops=1)

  • Group Key: global_schedule.id
2. 18.768 2,109.968 ↓ 47.0 47 1

Nested Loop Left Join (cost=856.85..2,090.82 rows=1 width=96) (actual time=2,074.578..2,109.968 rows=47 loops=1)

  • Join Filter: (marker.date = global_schedule.date)
  • Rows Removed by Join Filter: 2376
  • Filter: ((((point.ege_place_type)::text = ANY ('{ppe,rcoi}'::text[])) AND ((point.ancestry)::text = '1058973'::text)) OR (point.id IS NULL))
  • Rows Removed by Filter: 47
3. 0.365 0.365 ↑ 1.0 45 1

Index Scan using global_schedules_pkey on global_schedules global_schedule (cost=0.14..13.81 rows=45 width=71) (actual time=0.014..0.365 rows=45 loops=1)

4. 17.607 2,090.835 ↓ 27.0 54 45

Materialize (cost=856.71..2,075.21 rows=2 width=61) (actual time=41.083..46.463 rows=54 loops=45)

5. 0.808 2,073.228 ↓ 27.0 54 1

Nested Loop Left Join (cost=856.71..2,075.20 rows=2 width=61) (actual time=1,848.394..2,073.228 rows=54 loops=1)

6. 180.532 2,071.845 ↓ 5.0 5 1

Hash Join (cost=856.42..2,074.25 rows=1 width=65) (actual time=1,848.334..2,071.845 rows=5 loops=1)

  • Hash Cond: ((((point.ancestry)::text || '/'::text) || (point.id)::text) = (auditorium.ancestry)::text)
7. 159.752 159.752 ↑ 1.0 22,763 1

Seq Scan on places point (cost=0.00..1,018.63 rows=22,763 width=32) (actual time=0.042..159.752 rows=22,763 loops=1)

8. 0.068 1,731.561 ↓ 5.0 5 1

Hash (cost=856.40..856.40 rows=1 width=53) (actual time=1,731.554..1,731.561 rows=5 loops=1)

  • Buckets: 1024 Batches: 1 Memory Usage: 9kB
9. 570.641 1,731.493 ↓ 5.0 5 1

Merge Join (cost=757.17..856.40 rows=1 width=53) (actual time=385.435..1,731.493 rows=5 loops=1)

  • Merge Cond: (marker_user.id = marker.user_id)
  • Join Filter: ((((auditorium.ancestry)::text || '/'::text) || (auditorium.id)::text) = (camera.ancestry)::text)
  • Rows Removed by Join Filter: 37355
10. 518.519 889.920 ↑ 5.6 37,361 1

Nested Loop (cost=154.48..3,981.00 rows=209,216 width=28) (actual time=1.312..889.920 rows=37,361 loops=1)

11. 0.115 0.115 ↑ 4.7 6 1

Index Scan using users_pkey on users marker_user (cost=0.28..308.53 rows=28 width=4) (actual time=0.023..0.115 rows=6 loops=1)

  • Filter: (user_group_id = ANY ('{10,2,11,17}'::integer[]))
  • Rows Removed by Filter: 13
12. 313.745 371.286 ↑ 1.2 6,227 6

Materialize (cost=154.20..1,075.96 rows=7,472 width=24) (actual time=0.217..61.881 rows=6,227 loops=6)

13. 56.400 57.541 ↑ 1.0 7,472 1

Bitmap Heap Scan on places auditorium (cost=154.20..1,038.60 rows=7,472 width=24) (actual time=1.240..57.541 rows=7,472 loops=1)

  • Recheck Cond: ((ege_place_type)::text = 'auditorium'::text)
  • Heap Blocks: exact=790
14. 1.141 1.141 ↑ 1.0 7,472 1

Bitmap Index Scan on index_places_on_ege_place_type (cost=0.00..152.33 rows=7,472 width=0) (actual time=1.135..1.141 rows=7,472 loops=1)

  • Index Cond: ((ege_place_type)::text = 'auditorium'::text)
15. 267.115 270.932 ↓ 506.9 29,905 1

Sort (cost=602.70..602.84 rows=59 width=53) (actual time=4.032..270.932 rows=29,905 loops=1)

  • Sort Key: marker.user_id
  • Sort Method: quicksort Memory: 27kB
16. 1.796 3.817 ↑ 2.8 21 1

Nested Loop (cost=0.29..600.96 rows=59 width=53) (actual time=0.139..3.817 rows=21 loops=1)

17. 0.812 0.812 ↓ 1.0 93 1

Seq Scan on markers marker (cost=0.00..7.75 rows=92 width=37) (actual time=0.018..0.812 rows=93 loops=1)

  • Filter: ((moderation_state)::text = 'approved'::text)
  • Rows Removed by Filter: 47
18. 1.209 1.209 ↓ 0.0 0 93

Index Scan using places_pkey on places camera (cost=0.29..6.44 rows=1 width=24) (actual time=0.011..0.013 rows=0 loops=93)

  • Index Cond: (id = marker.place_id)
  • Filter: ((ege_place_type)::text = 'camera'::text)
19. 0.575 0.575 ↓ 1.6 11 5

Index Only Scan using index_schedules_on_place_id_and_broadcast_hidden on schedules schedule (cost=0.29..0.88 rows=7 width=4) (actual time=0.022..0.115 rows=11 loops=5)

  • Index Cond: (place_id = auditorium.id)
  • Heap Fetches: 53