I was just running a relative simple exists? query: Page.exists?(["id > ?",i])
which equates to SELECT COUNT(*) FROM `pages` WHERE (id > 1400000) LIMIT 1 You would think with a COUNT and a LIMIT 1, that things would be really fast, but its SUPER slow, its trying to count all the records greater than 1400000. This is N times faster: SELECT * FROM `pages` WHERE (id > 1400000) LIMIT 1 Do you guys think this needs to be changed, or not worth changing COUNT(*) to just * even though its a "LIMIT 1" ? -- Posted via http://www.ruby-forum.com/. --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group. To post to this group, send email to [email protected] To unsubscribe from this group, send email to [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en -~----------~----~----~----~------~----~------~--~---

