1

We use Telerik Grid (in ASP.NET AJAX).

It's convenient to use column grid filters because it let us avoid lot's routine job.

But the bad size is that it used to generate such kind of queries to our SQL Server:

SELECT *
FROM [dbo].[OPCatalogue] AS [t0]
WHERE (CONVERT(NVarChar(MAX), (CASE
                                  WHEN 0 = 1 THEN CONVERT(NVarChar(40), '')
                                  ELSE CONVERT(NVarChar(40), [t0].[SKU])
                                END))) LIKE 'something%' 

This query works without using indices, so it would be much more prefer to construct the SQL like this:

SELECT *
FROM [dbo].[OPCatalogue] AS [t0]
WHERE [t0].SKU LIKE 'something%'

This way it's going to use the index and work much faster.

How can we make Telerik Grid generate such kind of simpler queries?

Thanks!

0

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge that you have read and understand our privacy policy and code of conduct.

Browse other questions tagged or ask your own question.