Ylan, That reminds me of one of my early Rails clients, circa 2009, a rescue project where a developer made a textbook-perfect MySQL database for which queries ran about a minute, just like yours. In that case the problem was that there were quite a few associated tables with the main table to be queried and the number of joins to be created bogged it down to the point of being unusable, though users were putting up with it.
I handled it by de-normalizing the database to eliminate the joins altogether. Might have been done another way, but it was something I could do fairly quickly and it had similar results, down to a few hundred milliseconds. Scott On Monday, October 13, 2014 12:02:30 PM UTC-4, Ylan Segal wrote: > > Guyren, > > Thanks for putting this up and for the talk: Last week I had the need of > doing some DB optimization and accomplished a great deal by rewriting some > queries and adding and indexes on multiple columns that resulted in a query > going from 65s to 300ms. Having your talk fresh in my mind certainly > helped. > > Thanks, > > -- > Ylan Segal > [email protected] <javascript:> > > > On Sunday, October 12, 2014 at 11:40 PM, Guyren Howe wrote: > > > My presentation about Indexes is online. It is at Slideshare here: > > > > < > http://www.slideshare.net/gisborne/indexes-the-second-pillar-of-database-wisdom> > > > > > > although I had to convert it to Powerpoint in order to put it there, so > there are some minor conversion issues. > > > > It is also available on Youtube, complete with my vocal discussion. > > > > <http://youtu.be/9wYPgtKiF3s> > > > > Note that I made some minor improvements to it since I gave it at the > meeting. > > > > -- > > -- > > SD Ruby mailing list > > [email protected] <javascript:> (mailto:[email protected] > <javascript:>) > > http://groups.google.com/group/sdruby > > --- > > You received this message because you are subscribed to the Google > Groups "SD Ruby" group. > > To unsubscribe from this group and stop receiving emails from it, send > an email to [email protected] <javascript:> (mailto: > [email protected] <javascript:>). > > For more options, visit https://groups.google.com/d/optout. > > > > -- -- SD Ruby mailing list [email protected] http://groups.google.com/group/sdruby --- You received this message because you are subscribed to the Google Groups "SD Ruby" group. To unsubscribe from this group and stop receiving emails from it, send an email to [email protected]. For more options, visit https://groups.google.com/d/optout.
