Your Privacy Matters: We use our own and third-party cookies to improve your experience on our website. By continuing to use the website we understand that you accept their use. Cookie Policy
1005
IQueryable/[GridDataSourceAction] & Expensive "SELECT TOP(1)"...
posted

When using a IQueryable dataset in my GridDataSourceAction I'm seeing a "SELECT TOP(1)" query on my large complex SQL Server view.  Is there a reason why the iggrid needs to get the first row of my view and if so how can I stop it?

I can return 40,000 rows in less than a second but the TOP (1) takes multiple seconds.

Parents
No Data
Reply
  • 15320
    Offline posted

    Hello Dr Tone,

    The reason that "Select Top(1)" query is generated could be related to the fact that your grid has Paging, AppendRowsOnDemand or AutoGenerateColumns enabled on any of the layouts. However in order to investigate this behavior further, please send me an isolated sample that reproduces the issue.
    Looking forward to hearing from you.

    Regards,

    Tsanna

Children