我在Azure中使用ColdFusion 2016中的数据库。我正在使用Sqljdbc41.jar(有关如何配置它的有用链接:link1 link2)这是我的查询。 [uuid]有一个索引,是varchar(36),pkIdentity是主键int。
select pkIdentity
from tbl1
where [uuid] = <cfqueryparam cfsqltype="cf_sql_varchar" value="#attributes.uuid#" maxlength="36">
此查询占用Azure中的大多数DTU。 Coldfusion将其发送到Azure
(@P0 nvarchar(4000))select pkIdentity
from tbl1
where [uuid]= @P0
我已经读过,在将jdbc驱动程序传递给Azure SQL时,它的设置可能是casting the varchar datatype as varchar。但是,我没有在CF数据库设置屏幕中选择禁用转换为nvarchar。
我认为这些是我的选择。您认为哪个更好?