MySQL returning slow queries with result sets bigger than 30 rows

Posted by josephs8 on Server Fault See other posts from Server Fault or by josephs8
Published on 2011-12-26T21:22:53Z Indexed on 2012/09/23 15:40 UTC
Read the original article Hit count: 221

Filed under:
|
|

When ever I run a query that exceeds 30 queries the time for the query to run goes from less than a second to over 10 seconds to get data. Example I run a query to return 29 rows, it takes .1 seconds, I run a query to return 31 rows it takes 11.2 seconds. I am running mySQL on Windows 2008 Server Dual Core 2.6Ghz with 3GB of Memory. The machine doesn't run anything else. It does have a instance of MSSQL running on the server but that does not get used at all. This only happens via PHP right now, If I manually run the query on the server it returns it in less than a second.

The queries are not complicated either I have included one below:

SELECT Name, Value FROM `bis_co`.`departments` LIMIT 31

What would be causing this issue and how can I correct this? Am I missing a configuration setting in MySQL or something.

Thanks

© Server Fault or respective owner

Related posts about windows-server-2008

Related posts about mysql