Based on this, I'd say there is something wrong with your database. Or at the OS level... swapping, bad disks, something.
I'd remove rails from the equation and run a test update query directly via mysql until you can figure it out. On Mar 6, 2009, at 2:38 PM, Tomim wrote: > > Tables are almost empty - just a few(<10) records for testing. > It seems that those slow queries happen sporadically, one time it > takes 3.4sec, the next time 0.0002sec. > But the interesting part is that it always takes very short or very > long amount of time - never in between. > So because the whole database holds just a few records, and there are > moments that it works as it should - i think it is a server/caching > issue. > I just started developing this app, and it only has primary keys on > "id" column, no other indexes etc. > > On 6 Mar, 22:40, Philip Hallstrom <[email protected]> wrote: >>>>> The problem is that some queries take more than 1sek! - and i've >>>>> got >>>>> no idea why. >>>>> This doesnt happen on my localhost (sqlite/mysql). >> >> Can we see the describe output of those tables? (users, projects, >> users_projects)? Also, how many rows in each? > > --~--~---------~--~----~------------~-------~--~----~ 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 -~----------~----~----~----~------~----~------~--~---

