We are having an issue when executing either queries or stored procedures with CF2018 running on Windows 2016/2019. The same code running on Windows 2012 runs fine, however when executed on Windows 2016/2019 the execution times are 5-10x (at least) as long. The database server is MS SQL Server 2012.
Enabling logging on the datasource indicates the slowdown occurs at PreparedStatement[n].execute() . On Windows 2012 it takes 15ms vs 265ms on Windows 2016/2019. We have tested this using CF2018 update 3-5 and recevied the same results, looping the same query up to 200 times.
Could this possibly be related to nvarchar? See attached screenshot. I am sure the query could be optimized but we can not determine a valid reason of the slow performance due to the Window OS.
This appears to be related to the CF built-in drivers. Since we are using Java 12, we updated to Microsoft JDBC Driver 7.4 for SQL Server and the issue was resolved. We are waiting to test this on a Java 10 install, but I am assuming that Microsoft JDBC Driver 7.0 for SQL Server will work fine using a JDBC datasource.