Skip to content

Instantly share code, notes, and snippets.

@danhixon
Created May 30, 2011 19:10
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 danhixon/999336 to your computer and use it in GitHub Desktop.
Save danhixon/999336 to your computer and use it in GitHub Desktop.
Anybody know where I can look for what is taking long in this rails action?
Parameters: {"auth_token"=>"2Sq2-Wo4_I0PeIu_OeRR", "options"=>{"lat"=>"33.465199999999996", "lng"=>"-111.92419833333334", "of_each"=>"15"}}
Geokit is using the domain: localhost
Location Load (9.5ms) SELECT locations.*, distance(coordinates, ST_GeomFromText('POINT(33.4657 -111.9229)')) distance FROM "locations" WHERE (nearby_categories & 1 <> 0) AND (coordinates && Expand( ST_GeomFromText('POINT(33.465199999999996 -111.92419833333334)'), 0.005)) ORDER BY distance ASC LIMIT 50 OFFSET 0
Location Load (3.5ms) SELECT locations.*, distance(coordinates, ST_GeomFromText('POINT(33.4657 -111.9229)')) distance FROM "locations" WHERE (nearby_categories & 2 <> 0) AND (coordinates && Expand( ST_GeomFromText('POINT(33.465199999999996 -111.92419833333334)'), 0.005)) ORDER BY distance ASC LIMIT 50 OFFSET 0
Location Load (3.4ms) SELECT locations.*, distance(coordinates, ST_GeomFromText('POINT(33.4657 -111.9229)')) distance FROM "locations" WHERE (nearby_categories & 4 <> 0) AND (coordinates && Expand( ST_GeomFromText('POINT(33.465199999999996 -111.92419833333334)'), 0.005)) ORDER BY distance ASC LIMIT 50 OFFSET 0
Location Load (2.6ms) SELECT locations.*, distance(coordinates, ST_GeomFromText('POINT(33.4657 -111.9229)')) distance FROM "locations" WHERE (nearby_categories & 8 <> 0) AND (coordinates && Expand( ST_GeomFromText('POINT(33.465199999999996 -111.92419833333334)'), 0.005)) ORDER BY distance ASC LIMIT 50 OFFSET 0
User Load (1.5ms) SELECT "users".* FROM "users" WHERE ("users"."id" = 46) LIMIT 1
Favorite Load (0.7ms) SELECT "favorites".* FROM "favorites" WHERE ("favorites".user_id = 46)
UserRankReward Load (0.7ms) SELECT "user_rank_rewards".* FROM "user_rank_rewards" WHERE ("user_rank_rewards".user_id = 46)
Completed 200 OK in 6128ms (Views: 71.1ms | ActiveRecord: 45.4ms)
@danhixon
Copy link
Author

I think it is the AR load...

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment