Thanks for the response. I do realise this. What I saw was the moment mtop reported the query as running on mysqld. The time it took after interacting with the application until the query was shown as running and the time it took after the query finished to the results actually displaying on screen was negligible. My concern is that the time it takes a query generated from symfony (or PHP, I am not saying its just symfony) and showing in mtop seems to always be a lot longer thanthe same query run directly on the server via the mysql command line client.
Gareth On Thu, Mar 26, 2009 at 3:52 PM, Thomas Rabaix <[email protected]>wrote: > [I suppose you are using an ORM] > > ORM executes pre and post actions while quering the database. Of course > these actions can slow down the all application. More over you can have > models which perform sub actions while being hydrated. > > > > On Thu, Mar 26, 2009 at 2:30 PM, Gareth McCumskey <[email protected]>wrote: > >> Greetings all, >> >> I had an interesting observation which I was hoping someone might be able >> to answer. Maybe I am deluding myself but what I have seen is difficult to >> just dismiss outright. >> >> I run a pretty complex, multi-join query in a symfony application we are >> building and in investigating its performance (or lack thereof) I was >> watching the mtop view of the query running to see in an obviously very >> qualitative way, where the bottleneck was; the query itself or the >> post-processing once the DB server has returned the results to the >> application and needs to be processed for display (i.e query vs propel). >> What I noticed was that as soon as mtop reported the query as finished that >> my browser display almost immediately returned the view that had to be >> generated from it. In other words, the post-processing seemed to be >> negligible and the application was performing admirably. It looked as if the >> query itself was the bottleneck. >> >> So I decided to run the query directly in the mysql command line client so >> that I could test a few things like using EXPLAIN etc. And here is where I >> discovered an oddity. Running the query via the application, it would take, >> as far as mtop said, up to 30 seconds to complete. Running the exact query >> in the mysql client (copy and paste from logs) resulted in a query of a few >> seconds. And no this was not due to caching. I ran the tests one after the >> other for the application and then the mysql client and turned caching off, >> with the app consistently taking a lot longer than the direct query run. >> >> Is there anyone out there that would know of any potential performance >> impact when the mysql server recieves a query via another application vs >> directly through its client? Is it purely because of transferring data back >> to a calling app causing the excess delay? And lastly, are there any >> settings that can help alleviate such an issue if it exists? My google >> searches have turned up nothing. >> >> Gareth >> >> >> > > > -- > Thomas Rabaix > http://rabaix.net > > > > --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "symfony users" 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/symfony-users?hl=en -~----------~----~----~----~------~----~------~--~---
