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
510
I found that each grid data request loads Database 4 times, can I avoid so many times DB query?
posted

I found that each grid data request will query database 4 times. Can I avoid so many times DB query?

I use the LinqToSql solution for grid data source. And my Sql executing is very slow (each sql will take about 10 seconds).

I found that each grid load request takes about 40 seconds, it’s unacceptable.

When I dive into the code. I found you load the data source 4 times in following functions:

  1. GridModel.GenerateColumns()
  2. GridModel.CheckNullable()
  3. GridModel.GenerateLayouts()
  4. GridModel.RenderFlatQueryable()

I understand that the data query in GridModel.RenderFlatQueryable() is necessary, but can we avoid data load in other 3 functions? Or do you have other solutions for my situation?

This is a very urgency issue which need you help!

Thanks.

Parents Reply Children