I have a group of reports that query against a non-unicode table (all VARCHAR)
In these reports is a multi-value string parameter that is used to filter data in this table.
In the dataset, I am using this SQL:
Select Field1
From Data
Where Field2 in (@Parameter)
When SSRS sends this query to the SQL Server, it converts the @Parameter values to Unicode (Prefaces each string with an N)
For example:
Where Field2 in (N'abc',N'def')
The issue with this is that the SQL Server reverts to an index scan, rather than an index seek, causing bad performance, 7-8 seconds instead of <1 second if I run the same query without the unicode strings.
Is there any way to work around this?
Thanks!
http://bobp1339.blogspot.com
In these reports is a multi-value string parameter that is used to filter data in this table.
In the dataset, I am using this SQL:
Select Field1
From Data
Where Field2 in (@Parameter)
When SSRS sends this query to the SQL Server, it converts the @Parameter values to Unicode (Prefaces each string with an N)
For example:
Where Field2 in (N'abc',N'def')
The issue with this is that the SQL Server reverts to an index scan, rather than an index seek, causing bad performance, 7-8 seconds instead of <1 second if I run the same query without the unicode strings.
Is there any way to work around this?
Thanks!
http://bobp1339.blogspot.com