Portal Home > Knowledgebase > Articles Database > Custom Php/Mysql page loads slow - how to debug?


Custom Php/Mysql page loads slow - how to debug?




Posted by spiceman, 02-06-2010, 12:45 PM
Here's the scenario... my pogrammer developed a simple listing page of artists names that has pagination... then he developed another listing page that has CD Names.... both pages have 5000 records However, one page loads much slower than the other ... the slower page does have a few more joins but not joins on big tables... Is there ANYWAY to step through via a debug mode how the PHP/MYSQL is executed and determine which statement, query or table is not optimized? The fast page loads in 2sec... the other page loads in 12sec... its a huge difference when ppl get impatient and keep on clicking refresh thanks in advance... pls point me in right direction if this is not the proper forum..

Posted by sasha, 02-06-2010, 02:37 PM
You could run the queries with EXPLAIN. Chances are that some index that your programmer thinks should be used is not used at all. On the other hand, database layout could be crap and the code could be sloppy. If you would post the code and database structure here, I am sure someone could help you out.

Posted by sKunKbad, 02-07-2010, 02:28 AM
If it were me, I'd go over to phpfreaks and ask in their MySQL forum. They will want to know the exact queries, and may want to know the database schema. There is always a quick answer over there. I don't mean to advertise for them, or get you to leave this forum (not even for a second!). I'm just trying to be helpful, and that forum is pretty massive and super active.



Was this answer helpful?

Add to Favourites Add to Favourites    Print this Article Print this Article

Also Read
DDUK Hosting problem (Views: 672)

Language: