Sharepoint 2010 - caml query performance expectation

851 Views Asked by At

What is a reasonable level of performance I should expect from querying a very large list in Sharepoint 2010? My list is only 1000 items and after a few days of looking at Sharepoint performance dos and don'ts I still couldn't determine what a good performance benchmark should be.

A project that I am working on was started and designed using Sharepoint 2010 with a list layout structured as a relational database. I think the original expectation was to use Sharepoint to take advantage of out of the box search and versioning functionality and to use spmetal and the repository pattern for data retrieval. I am having horrible performance under load (or what I would think would be horrible performance as I am used to using sql server). Queries on a list of 1000 items using spmetal and 20-30 users are taking 10-15 seconds to load. I decided to just go bare bones to see what I could get. Below is the code.

SPQuery query = new SPQuery();
query.Query = "<View><ViewFields><FieldRef Name=\"ID\" /></ViewFields></View>";
query.ViewFieldsOnly = true;
query.RowLimit = 1000;
SPList list = web.Lists["Incidents"];
var items = list.GetItems(query).OfType<SPListItem>().ToArray();

Item Count: 1000 Average Time: 1197 millseconds

Is this good performance? This is only one call, no other queries to the Incidents list at the same time..nothing.

1

There are 1 best solutions below

2
On

Yes, it's average performance, at least for a all in one farm.