explain.depesz.com

PostgreSQL's explain analyze made readable

Result: J138

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

Sort (cost=461.60..461.87 rows=550 width=294) (actual rows= loops=)

  • Sort Key: "Event".updated_at DESC
2. 0.000 0.000 ↓ 0.0

Hash Left Join (cost=96.96..456.59 rows=550 width=294) (actual rows= loops=)

  • Hash Cond: ("Event".event_id = "tags->EventTagAssociation".event_id)
3. 0.000 0.000 ↓ 0.0

Hash Left Join (cost=48.56..406.03 rows=521 width=214) (actual rows= loops=)

  • Hash Cond: ("Event".event_id = "filter_tags->EventTagAssociation".event_id)
4. 0.000 0.000 ↓ 0.0

Nested Loop Left Join (cost=0.17..355.58 rows=491 width=134) (actual rows= loops=)

5. 0.000 0.000 ↓ 0.0

Limit (cost=0.06..3.80 rows=100 width=118) (actual rows= loops=)

6. 0.000 0.000 ↓ 0.0

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

  • Filter: (NOT hidden)
7. 0.000 0.000 ↓ 0.0

Nested Loop (cost=0.11..3.50 rows=5 width=32) (actual rows= loops=)

8. 0.000 0.000 ↓ 0.0

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 rows= loops=)

  • Index Cond: ("Event".event_id = event_id)
9. 0.000 0.000 ↓ 0.0

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

  • Index Cond: (photo_id = "photos->EventPhotoAssociation".photo_id)
10. 0.000 0.000 ↓ 0.0

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

11. 0.000 0.000 ↓ 0.0

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

  • Hash Cond: ("filter_tags->EventTagAssociation".tag_id = filter_tags.tag_id)
12. 0.000 0.000 ↓ 0.0

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

13. 0.000 0.000 ↓ 0.0

Hash (cost=11.95..11.95 rows=650 width=16) (actual rows= loops=)

14. 0.000 0.000 ↓ 0.0

Seq Scan on tag filter_tags (cost=0.00..11.95 rows=650 width=16) (actual rows= loops=)

15. 0.000 0.000 ↓ 0.0

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

16. 0.000 0.000 ↓ 0.0

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

  • Hash Cond: ("tags->EventTagAssociation".tag_id = tags.tag_id)
17. 0.000 0.000 ↓ 0.0

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

18. 0.000 0.000 ↓ 0.0

Hash (cost=11.95..11.95 rows=650 width=80) (actual rows= loops=)

19. 0.000 0.000 ↓ 0.0

Seq Scan on tag tags (cost=0.00..11.95 rows=650 width=80) (actual rows= loops=)