Skip to content

Instantly share code, notes, and snippets.

@sethdorris
Last active July 27, 2017 14:45
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save sethdorris/8c70b04ec1af8ae4c4cb7c72b713e21e to your computer and use it in GitHub Desktop.
Save sethdorris/8c70b04ec1af8ae4c4cb7c72b713e21e to your computer and use it in GitHub Desktop.
'Unique (cost=101.15..102.99 rows=67 width=987)'
' -> Sort (cost=101.15..101.32 rows=67 width=987)'
' Sort Key: wt.userid, wt.id, wt.riderid, wt.season_weeksid, r.name, r.avatar_url, r.active, rr.place, (max(seasons.seasonid)), seasons.season_name'
' -> Nested Loop (cost=57.54..99.12 rows=67 width=987)'
' Join Filter: (wt.riderid = r.id)'
' -> Hash Join (cost=57.40..89.46 rows=47 width=454)'
' Hash Cond: (rr.riderid = wt.riderid)'
' -> Seq Scan on raceresults rr (cost=0.00..25.70 rows=1570 width=8)'
' -> Hash (cost=57.32..57.32 rows=6 width=446)'
' -> Hash Join (cost=44.93..57.32 rows=6 width=446)'
' Hash Cond: (season_weeks.season_weeksid = wt.season_weeksid)'
' -> Seq Scan on season_weeks (cost=0.00..11.70 rows=170 width=8)'
' -> Hash (cost=44.86..44.86 rows=6 width=446)'
' -> Hash Join (cost=40.76..44.86 rows=6 width=446)'
' Hash Cond: ((max(seasons.seasonid)) = wt.seasonid)'
' -> HashAggregate (cost=12.55..14.25 rows=170 width=426)'
' Group Key: seasons.season_name'
' -> Seq Scan on seasons (cost=0.00..11.70 rows=170 width=426)'
' -> Hash (cost=28.13..28.13 rows=7 width=24)'
' -> Seq Scan on weekly_team wt (cost=0.00..28.13 rows=7 width=24)'
' Filter: (leagueid = 1)'
' -> Index Scan using riders_pkey on riders r (cost=0.14..0.19 rows=1 width=541)'
' Index Cond: (id = rr.riderid)'
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment