I have an application that loads a vast amount of data from twitter. We have began to notice some performance issues and so I setup SQL Profiler for the applications database. I have noticed the following SQL statement are being executed but do not appear anywhere in my code. Therefore, I am assuming that either SQL Server 2005 or ColdFusion 8 are adding these statements in for some reason.
SET TRANSACTION ISOLATION LEVEL READ COMMITTED
SET FMTONLY ON select Title from Links where 1=2 SET FMTONLY OFF
exec [sys].sp_datatype_info_90 -9,@ODBCVer=4
EXEC sp_executesql N'set implicit_transactions off select USER_NAME() select usertype,type,name from systypes where usertype>=257'
EXEC sp_execute 16,'iTunes Store'
exec sp_unprepare 28
Why are these statements being added, are they needed, and if not how can I stop them?
1,2,3,4 can be accounted for in "normal" ColdFusion code - assuming you are on version 8 or 9. It does all sorts of mucking around in the backend to ensure the database server is capable and ready to return information automatically that ColdFusion requests as part of CFQUERY, even though it may not be explicitly called for in your actual query.
http://www.forta.com/blog/index.cfm/2007/7/6/ColdFusion-8-Can-Return-Identity-Values
I have no idea what 5 and 6 are doing.
Also, are you using the Adobe provide MS SQL Driver or are you using the MS JDBC SQL Driver? There are some differences between using the two drivers:
http://cfsearching.blogspot.com/2008/03/cf8-ms-jdbc-12-driver-and-for-my-next.html
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With