Friends, I was wondering if any Rails/SQL Server experts could offer some help in regards to a question I had. Lately I have been getting some "timeout expired" errors in rails for some of my find_by_sql queries. When I load these pages, they often take upwards of 2-4 minutes and eventually they throw a timeout exception. When I run the exact same query in SQL Enterprise Manager, the queries execute in under a second. My question is, what is the difference between running a query in rails and in enterprise manager to account for the difference in computing time? Any insight would be greatly appreciated, Jin Lee --~--~---------~--~----~------------~-------~--~----~ 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 rubyonrails-talk-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk-unsubscribe-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en -~----------~----~----~----~------~----~------~--~---
Philip Hallstrom
2007-Aug-15 20:27 UTC
Re: can someone explain sql server performance differences?
> Friends, > > I was wondering if any Rails/SQL Server experts could offer some help in > regards to a question I had. > > Lately I have been getting some "timeout expired" errors in rails for some > of my find_by_sql queries. When I load these pages, they often take upwards > of 2-4 minutes and eventually they throw a timeout exception. > > When I run the exact same query in SQL Enterprise Manager, the queries > execute in under a second. > > My question is, what is the difference between running a query in rails and > in enterprise manager to account for the difference in computing time?What type of query? What size is the result set? If that query is returning a million rows, AR is going to instantiate a million objects. Which is going to take a lot of time.... Without having any idea what sort of query on what sort of data it''s gonna be hard to say. --~--~---------~--~----~------------~-------~--~----~ 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 rubyonrails-talk-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk-unsubscribe-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en -~----------~----~----~----~------~----~------~--~---