I ask if this is possible with hopes I can squeeze every last ounce of optimization from my database(s). Is there any way to tell rails to cache or not inspect tables with all of these "SHOW FIELDS FROM" queries? I''ve searched around but haven''t come up with anything concrete. Anyone have any tips? - J --~--~---------~--~----~------------~-------~--~----~ 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 -~----------~----~----~----~------~----~------~--~---
> I ask if this is possible with hopes I can squeeze every last ounce of > optimization from my database(s). > Is there any way to tell rails to cache or not inspect tables with all of > these "SHOW FIELDS FROM" queries? > I''ve searched around but haven''t come up with anything concrete. Anyone > have any tips?How about running rails in production mode? Regards, Rimantas -- http://rimantas.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 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 -~----------~----~----~----~------~----~------~--~---
Rimantas - Pardon my ignorance, but when in production mode it does NOT make those queries? Could you point me to where in the docs this is specified? Some colleagues of mine were wondering the same issue and I''d like to point them somewhere. Thanks for the reply. - Joel On 7/30/07, Rimantas Liubertas <rimantas-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> wrote:> > > > I ask if this is possible with hopes I can squeeze every last ounce of > > optimization from my database(s). > > Is there any way to tell rails to cache or not inspect tables with all > of > > these "SHOW FIELDS FROM" queries? > > I''ve searched around but haven''t come up with anything concrete. Anyone > > have any tips? > > How about running rails in production mode? > > Regards, > Rimantas > -- > http://rimantas.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 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 -~----------~----~----~----~------~----~------~--~---
> Rimantas - > > Pardon my ignorance, but when in production mode it does NOT make those > queries?It does, but only once, on initial load. In development mode your model classes get reloaded on every request.> Could you point me to where in the docs this is specified? Some > colleagues of mine were wondering the same issue and I''d like to point them > somewhere.Not sure if this is the best place fot this, but take a look at config/environments/development.rb and config/environments/production.rb development.rb: # In the development environment your application''s code is reloaded on # every request. This slows down response time but is perfect for development # since you don''t have to restart the webserver when you make code changes. config.cache_classes = false production.rb: # The production environment is meant for finished, "live" apps. # Code is not reloaded between requests config.cache_classes = true Regards, Rimantas -- http://rimantas.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 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 -~----------~----~----~----~------~----~------~--~---