Patrick Burleson wrote:
Even more fun info here, is that if your JDBC driver (like say the DataDirect driver) uses
NVARCHAR parameters with maximum widths (4000), SQL Server 7.0 will take forever to give you
results. In our case, from 1 second using a VARCHAR (or even a shorter NVARCHAR) to 18 seconds.
This problem doesn't appear in SQL Server 2000.


Now, the part about not using an index I have no idea about. Would be interesting to investigate.

I thought we did this check against SQL Server 2000 at the time, but maybe you've encountered a similar but separate issue with NVARCHAR supprot.


I forget how we did the check. Maybe we were using the query analyzer to learn how SQL Server was parsing the query, but basically when you had an NVARCHAR parameter compared to a VARCHAR field, SQL Server would do a CONVERT/CAST. This made the WHERE clause become a calculated value and prompt a table scan, instead of using an index.

Again, I forget exactly how we determined it, but yeah, it was staggering the performance difference.

--
Serge Knystautas
President
Lokitech >> software . strategy . design >> http://www.lokitech.com
p. 301.656.5501
e. [EMAIL PROTECTED]



-------------------------------------------------------
This SF.net email is sponsored by: VM Ware
With VMware you can run multiple operating systems on a single machine.
WITHOUT REBOOTING! Mix Linux / Windows / Novell virtual machines
at the same time. Free trial click here:http://www.vmware.com/wl/offer/358/0
_______________________________________________
hibernate-devel mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/hibernate-devel

Reply via email to