This is a migrated thread and some comments may be shown as answers.

[Solved] Grid causes a database locking issue

1 Answer 8 Views
Grid
This is a migrated thread and some comments may be shown as answers.
This question is locked. New answers and comments are not allowed.
Robert Munoz
Top achievements
Rank 1
Robert Munoz asked on 06 May 2011, 08:00 AM

 

We are using the grid with AJAX binding and a SQL server 2008 back-end (.Net 4, MVC 2 and LINQ to Entities in between) and are encountering database locking issues when we put the grid page(s) under load.

 

Is it possible to force the grid query to use an isolation level of ReadUncommitted?

 

Similar to this:

using (TransactionScope scope = new TransactionScope(TransactionScopeOption.Required, new TransactionOptions { IsolationLevel = System.Transactions.IsolationLevel.ReadUncommitted })) {

     //Run the query

}

 

We are not changing data directly from the grid so we don't mind if we encounter the odd phantom record.

 

Would could evaluate our LINQ before sending it to the GridModel but we don't want to be retrieving large result sets from the database and passing them around the web server. We'd prefer to let the GridModel retrieve just the data for the current grid page - but without taking out a database lock.

Thanks

1 Answer, 1 is accepted

Sort by
0
Atanas Korchev
Telerik team
answered on 06 May 2011, 08:06 AM
Hello Robert Munoz,

The grid does not perform any database communication actually. It only applies linq expressions to the  IQueryable which the developer has provided (to do paging, sorting, filtering or grouping). Setting isolation levels should happen when you retrieve the IQueryable for the first time.

Regards,
Atanas Korchev
the Telerik team
Do you want to have your say when we set our development plans? Do you want to know when a feature you care about is added or when a bug fixed? Explore the Telerik Public Issue Tracking system and vote to affect the priority of the items
Tags
Grid
Asked by
Robert Munoz
Top achievements
Rank 1
Answers by
Atanas Korchev
Telerik team
Share this question
or