We're updating the issue view to help you get more done. 

cfdbinfo is slow with MySQL Connector/J 8.0.x driver


It seems that MySQL Connector/J 8.0.x causes cfdbinfo to be significantly slower when run against the same table/database, when connecting to MySQL Server 5.6.x (have not tested other server versions).


1 2 3 4 5 6 7 8 9 10 11 12 13 14 component { this.name = "cfdbinfo"; // 5.1.x class "org.gjt.mm.mysql.Driver" // 8.0.x class "com.mysql.cj.jdbc.Driver" this.datasources["test"] = { "class" = "com.mysql.cj.jdbc.Driver", "connectionString" = "jdbc:mysql://HOSTNAME:3306/DBNAME?useUnicode=true&characterEncoding=UTF-8&allowMultiQueries=true&useLegacyDatetimeCode=true", "username" = "USERNAME", "password" = "PASSWORD" }; }


1 2 <cfdbinfo datasource="test" type="columns" table="myTableName" name="qColumns"> <cfdump var="#qColumns#">

Lucee Express using MySQL Connector/J 5.1.x: Execution Time: 8ms
Lucee Express using MySQL Connector/J 8.0.x: Execution Time: 128ms
Lucee Express using old MySQL Connector/J 5.1.x: Execution Time: 8ms

I've tested MySQL Connector/J 8.0.11 (the first GA release from March 2018) and 8.0.15 (the latest GA release, in Lucee 5.3.x) and both version have the same issue. The issue doesn't occur with Connector/J 5.1.40 (in Lucee 5.2.x from September 2016) or 5.1.46 (the latest version from Feb 2018).

For applications that do DB introspection on dozens of tables during startup (or at other times) this can affect performance significantly.

Note: There also appears to be a bug with datasources specified in the lucee-web.xml.cfm, changing the driver class name in the XML and removing dbdriver="MySQL" doesn't seem to affect the driver that is used, it always uses the Connector/J 8.0.x driver. I was unable to change the driver class to "org.gjt.mm.mysql.Driver" via the XML config and have it use that driver. This may affect your testing if you don't use the Application.cfc method for specifying datasources as in the example above.




Michael Offner


Justin Carter

Fix versions

Affects versions