Skip to main content
December 8, 2009
Question

CF9 mySQL slow

  • December 8, 2009
  • 2 replies
  • 918 views

I am having a speed issue with a query. It is a fairly basic query without any joins and it has 1100 rows, about 20 fields and the size is small (258 KB). When I run the query:

SELECT *

    FROM company

    WHERE Role = 'Customer' OR Role = 'Prospect'

    ORDER BY Company

It times out before it is completed. If I increase the time, it will complete, but it takes forever. I ran the same query on my old server (Server 2003) on the same table on a 5.0 mySQL install, but using CF7 and the 5.X msSQL driver, it completed in about 37 ms.

So I thought that I would isolate Coldfusion on the new server and I got the same results time, when I run the query in the mySQL admin tool (without the Coldfusion driver).

The server is Server 2008 and I am using the Coldfusion 9 and the mySQL driver that came with Coldfusion 9. Driver Version is 5.1.7. & mySQL version is 5.1.40.

So, the problem appears to be the Coldfusion 9 mySQL driver. Any suggestions or ideas? I'm I going nuts, or does anyone else have a speed issue with the CF9 and mySQL combination. Smaller tables seem to respond in an acceptable time frame on this new server.

Thanks in advance,

Bill

This topic has been closed for replies.

2 replies

Inspiring
December 24, 2009

There is a problem with the MySQL driver shipped with CF9.  You might want to grab the one from the MySQL site and use that instead.

--

Adam

December 24, 2009

Thanks Adam. I will take a look. There was nothing new there when I

initially installed Coldfusion.

Participant
December 13, 2009

This may seem strange, but try listing out the fields you want instead

of using select *.  I'm by no means a mysql expert, but I did have a slow running select * query and

changing it to list the fields made it run a lot faster.  Even made a difference when I used all of the fields. However you can get even faster if you only select the fields that you need.

Steve