Page 1 of 1
SQL is awfully slow...
Posted: Mon Oct 29, 2007 11:57 pm
by legend986
When I'm running a few statements through mysql console, they are working just fine but when I'm trying to write some logic in php and trying to execute it, its awfully slow.. Its perhaps performing, 10 queries in 20 seconds...

Why is this happening?
Posted: Tue Oct 30, 2007 4:47 am
by CoderGoblin
I would suggest you start by using your favourite search engine for database optimisation. To be honest it could a slew of different things... You don't really give us any information to work with so here are a couple of pointers... EXPLAIN ANALYZE is your friend. Do you use numeric indexes (searching numeric is quicker than text) ? Do you use indexes for only the information you need to as too many indexes can slow things down ? If using MySQL are you using the right table types.