problem with indices

2 posts, 0 answers
  1. Vitaliy
    Vitaliy avatar
    1 posts
    Member since:
    Oct 2014

    Posted 10 Oct 2014 Link to this post


    We use Telerik Grid (in ASP.NET AJAX).
    It's convinient 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 quieries to our SQL Server:

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

    This query works without using indecies, 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?
  2. Pavlina
    Pavlina avatar
    6069 posts

    Posted 15 Oct 2014 Link to this post


    You can handle ItemCommand event (check that e.CommandName is "FilterCommandName") where you can prevent the initial filtering and build a simpler queries:


    Check out the Telerik Platform - the only platform that combines a rich set of UI tools with powerful cloud services to develop web, hybrid and native mobile apps.

  3. DevCraft R3 2016 release webinar banner
Back to Top