I'm using MSSQL 2005, connecting through JDBC driver (application in JAVA). I have a ascii and unicoded data in my database. when I worked with JDBC connection to the database, all input data become unicoded (N'xxx') by the JDBC driver. There is a JDBC parameter to turn that parameter false or true, and I have mix data in my database. In this way, the execution plans are bad and instend of index seek, there are index scan, because MSSQL do implicint convert for each row. Do you have a way to solve this issue ? Eran.
I suggest you make sure that the setting for unicode is the same throughout yout application and concentrate on uniformity there. Also make sure that any t-sql code that you have is written to avoid conversions between unicode and non unicode. The easiest way is to take a look at the exact queries that you have identified and clean them up, one by one. Any new development should be done with this issue in mind, so that after a few iterations, you should have removed all cases of conversions in your code.