CF bug? or maybe jdbc driver something?
have a specific query that for unknown reason takes >20sec to load from a CF page but it's instant when ran directly on mssql studio
notes (Datasource=db2, Time=39320ms, Records=20) in @ 08:05:54.054
SET TRANSACTION ISOLATION LEVEL READ UNCOMMITTED;
SELECT TOP 20 id,productId,itemID,createdOn,message,createdBy,comments,manual,logType,qty,dataid,qtyOnHandAdj
FROM inventoryLog WHERE itemid = ?
AND logType <> 9
ORDER BY createdOn Desc
Query Parameter Value(s) -
Parameter #1(CF_SQL_INTEGER) = 40483
i played around with the TOP N. ONLY TOP 20 takes long. TOP 19,21,25,50 whatever all take milliseconds
i played around with column list.
if i exclude the dataID column, it's instant.
if i alias dataID as something, it's instant.
if i alias dataID as dataID, it's instant.
so it's only bad when TOP 20 and dataID without alias.
in CF2018 update 4
