explain.depesz.com

PostgreSQL's explain analyze made readable

Result: yfB

Settings
# exclusive inclusive rows x rows loops node
1. 1.388 281.486 ↑ 1.0 1 1

Index Scan using "Events_pkey" on "Events" e0 (cost=19,312.44..19,320.46 rows=1 width=2,026) (actual time=281.482..281.486 rows=1 loops=1)

  • Index Cond: (id = 52928)
  • Filter: ((hashed SubPlan 1) OR ('{nick@dice.fm}'::citext[] <@ read_access_emails))
2.          

SubPlan (forIndex Scan)

3. 66.749 280.098 ↓ 2.6 3,609 1

Hash Left Join (cost=9,312.17..19,308.73 rows=1,366 width=4) (actual time=141.058..280.098 rows=3,609 loops=1)

  • Hash Cond: ("EventPromoters"."PromoterId" = "PromoterUsers"."PromoterId")
  • Filter: (("PromoterUsers"."UserId" = 7159) OR ("VenueUsers"."UserId" = 7159))
  • Rows Removed by Filter: 515212
4. 61.044 210.636 ↓ 1.8 99,462 1

Hash Right Join (cost=9,150.11..13,637.85 rows=53,831 width=16) (actual time=120.489..210.636 rows=99,462 loops=1)

  • Hash Cond: ("EventVenues"."EventId" = "Events".id)
5. 29.200 57.636 ↓ 1.8 92,406 1

Hash Right Join (cost=1,951.59..5,727.29 rows=52,204 width=12) (actual time=28.458..57.636 rows=92,406 loops=1)

  • Hash Cond: ("VenueUsers"."VenueId" = "EventVenues"."VenueId")
6. 0.137 0.137 ↑ 4.0 461 1

Seq Scan on "VenueUsers" (cost=0.00..28.50 rows=1,850 width=16) (actual time=0.009..0.137 rows=461 loops=1)

7. 14.328 28.299 ↑ 1.1 49,633 1

Hash (cost=1,299.04..1,299.04 rows=52,204 width=8) (actual time=28.298..28.299 rows=49,633 loops=1)

  • Buckets: 65536 Batches: 1 Memory Usage: 2451kB
8. 13.971 13.971 ↑ 1.1 49,633 1

Seq Scan on "EventVenues" (cost=0.00..1,299.04 rows=52,204 width=8) (actual time=0.010..13.971 rows=49,633 loops=1)

9. 18.343 91.956 ↓ 1.0 53,564 1

Hash (cost=6,555.17..6,555.17 rows=51,468 width=8) (actual time=91.956..91.956 rows=53,564 loops=1)

  • Buckets: 65536 Batches: 1 Memory Usage: 2602kB
10. 32.408 73.613 ↓ 1.0 53,564 1

Hash Right Join (cost=5,357.38..6,555.17 rows=51,468 width=8) (actual time=28.808..73.613 rows=53,564 loops=1)

  • Hash Cond: ("EventPromoters"."EventId" = "Events".id)
11. 12.494 12.494 ↓ 1.0 52,927 1

Seq Scan on "EventPromoters" (cost=0.00..1,062.68 rows=51,468 width=8) (actual time=0.007..12.494 rows=52,927 loops=1)

12. 15.085 28.711 ↓ 1.0 49,925 1

Hash (cost=4,733.48..4,733.48 rows=49,912 width=4) (actual time=28.711..28.711 rows=49,925 loops=1)

  • Buckets: 65536 Batches: 1 Memory Usage: 2268kB
13. 13.626 13.626 ↓ 1.0 49,925 1

Index Only Scan using "Events_pkey" on "Events" (cost=0.29..4,733.48 rows=49,912 width=4) (actual time=0.013..13.626 rows=49,925 loops=1)

  • Heap Fetches: 2977
14. 1.463 2.713 ↑ 1.1 5,348 1

Hash (cost=90.36..90.36 rows=5,736 width=16) (actual time=2.712..2.713 rows=5,348 loops=1)

  • Buckets: 8192 Batches: 1 Memory Usage: 315kB
15. 1.250 1.250 ↑ 1.1 5,348 1

Seq Scan on "PromoterUsers" (cost=0.00..90.36 rows=5,736 width=16) (actual time=0.005..1.250 rows=5,348 loops=1)

Planning time : 0.951 ms
Execution time : 281.601 ms