bytte wrote:
Hey that was interesting. I have the indexes defined and I see though Firebug
that there's currently 381 queries being performed at 0.14949 seconds. I
guess that means they're not the culprit?
  
381 DB queries is a lot of queries for a single web page. Even if they only take 0.15 seconds combined, they will bring your DB server to it's knees as soon as you start putting some traffic through that page and other pages using the same DB.

You are likely running DB queries in a loop which is not good practice. You should be using the "IN" SQL clause or use joins. It is much faster to add some more loops to your PHP than to run DB queries. If this page is going to be run a lot I would even check if you need to fetch the data from the DB on every page request or if you can cache some semi-static data.




Reply via email to