explain.depesz.com

PostgreSQL's explain analyze made readable

Result: 6nRI

Settings
# exclusive inclusive rows x rows loops node
1. 0.443 4.213 ↑ 1.1 506 1

Sort (cost=461.60..461.87 rows=550 width=294) (actual time=4.188..4.213 rows=506 loops=1)

  • Sort Key: "Event".updated_at DESC
  • Sort Method: quicksort Memory: 257kB
2. 0.185 3.770 ↑ 1.1 506 1

Hash Left Join (cost=96.96..456.59 rows=550 width=294) (actual time=1.848..3.770 rows=506 loops=1)

  • Hash Cond: ("Event".event_id = "tags->EventTagAssociation".event_id)
3. 0.179 2.676 ↑ 1.0 506 1

Hash Left Join (cost=48.56..406.03 rows=521 width=214) (actual time=0.932..2.676 rows=506 loops=1)

  • Hash Cond: ("Event".event_id = "filter_tags->EventTagAssociation".event_id)
4. 0.146 1.608 ↓ 1.0 506 1

Nested Loop Left Join (cost=0.17..355.58 rows=491 width=134) (actual time=0.035..1.608 rows=506 loops=1)

5. 0.009 0.062 ↑ 1.0 100 1

Limit (cost=0.06..3.80 rows=100 width=118) (actual time=0.015..0.062 rows=100 loops=1)

6. 0.053 0.053 ↑ 15.6 100 1

Index Scan Backward using event_updated_at_index on event "Event" (cost=0.06..58.55 rows=1,564 width=118) (actual time=0.014..0.053 rows=100 loops=1)

  • Filter: (NOT hidden)
7. 0.390 1.400 ↑ 1.0 5 100

Nested Loop (cost=0.11..3.50 rows=5 width=32) (actual time=0.005..0.014 rows=5 loops=100)

  • -> Index Scan using event_photo_association_event_id_index on event_photo_association "photos->EventPhotoAssociation" (cost=0.06..2.90 rows=5 width=32) (actual time=0.003..0.004 rows=5 loops=100
  • Index Cond: ("Event".event_id = event_id)
8. 1.010 1.010 ↑ 1.0 1 505

Index Only Scan using photo_pkey on photo photos (cost=0.06..0.12 rows=1 width=16) (actual time=0.002..0.002 rows=1 loops=505)

  • Index Cond: (photo_id = "photos->EventPhotoAssociation".photo_id)
  • Heap Fetches: 505
9. 0.327 0.889 ↓ 1.0 1,593 1

Hash (cost=42.83..42.83 rows=1,589 width=80) (actual time=0.889..0.889 rows=1,593 loops=1)

  • Buckets: 2,048 Batches: 1 Memory Usage: 191kB
10. 0.393 0.562 ↓ 1.0 1,593 1

Hash Join (cost=14.22..42.83 rows=1,589 width=80) (actual time=0.022..0.562 rows=1,593 loops=1)

  • Hash Cond: ("filter_tags->EventTagAssociation".tag_id = filter_tags.tag_id)
11. 0.161 0.161 ↓ 1.0 1,603 1

Seq Scan on event_tag_association "filter_tags->EventTagAssociation" (cost=0.00..27.77 rows=1,589 width=64) (actual time=0.008..0.161 rows=1,603 loops=1)

12. 0.003 0.008 ↑ 108.3 6 1

Hash (cost=11.95..11.95 rows=650 width=16) (actual time=0.008..0.008 rows=6 loops=1)

  • Buckets: 1,024 Batches: 1 Memory Usage: 9kB
13. 0.005 0.005 ↑ 108.3 6 1

Seq Scan on tag filter_tags (cost=0.00..11.95 rows=650 width=16) (actual time=0.004..0.005 rows=6 loops=1)

14. 0.403 0.909 ↓ 1.0 1,593 1

Hash (cost=42.83..42.83 rows=1,589 width=96) (actual time=0.909..0.909 rows=1,593 loops=1)

  • Buckets: 2,048 Batches: 1 Memory Usage: 163kB
15. 0.361 0.506 ↓ 1.0 1,593 1

Hash Join (cost=14.22..42.83 rows=1,589 width=96) (actual time=0.030..0.506 rows=1,593 loops=1)

  • Hash Cond: ("tags->EventTagAssociation".tag_id = tags.tag_id)
16. 0.125 0.125 ↓ 1.0 1,603 1

Seq Scan on event_tag_association "tags->EventTagAssociation" (cost=0.00..27.77 rows=1,589 width=32) (actual time=0.004..0.125 rows=1,603 loops=1)

17. 0.016 0.020 ↑ 108.3 6 1

Hash (cost=11.95..11.95 rows=650 width=80) (actual time=0.020..0.020 rows=6 loops=1)

  • Buckets: 1,024 Batches: 1 Memory Usage: 9kB
18. 0.004 0.004 ↑ 108.3 6 1

Seq Scan on tag tags (cost=0.00..11.95 rows=650 width=80) (actual time=0.002..0.004 rows=6 loops=1)

Planning time : 0.746 ms
Execution time : 4.312 ms