Inscrivez-vous ou connectez-vous pour rejoindre votre communauté professionnelle.
You can use a SPQuery object setting the RowLimit to2000 items or less. You can iterate through the results. Alternatively if you only have one filter in your query, you can use the new SharePoint2010 server specific ContentIterator object. An example here: https://spcounselor-public.sharepoint.com/Blog/Post/2/Querying-a--big-list--with-ContentIterator-and-multiple-filters
This topic needs further discussion as it is not easy one, there are a lot of things which you have to take into consideration but this is #1 top performance killers.
There are4 methods:-
1. Use SPQuery.Throttlemode= OverRide/Strict
2. Use SPQuery.RowLimit and paging
3. Disable the list throttling in SSOM or PowerShell and enable it after the query
4. Use RWEP (this method only allows querying20000 items)
CQWP or camel
I am impresssed with CAML and used it inside list to filter data etc.
Hello,
Good day!!
If you are Working with large data retrieval from the content database (SharePoint list) just you have to consider the below points
a) Limit the number of returned items.
b) Limit the number of returned columns.
c) Query specific items using CAML (Collaborative Markup Language)
Limit the number of returned items
SPQuery query = new SPQuery();
query.RowLimit =2000; // we want to retrieve2000 items
query.ListItemCollectionPosition = prevItems.ListItemCollectionPosition; // starting at a previous position
SPListItemCollection items = SPContext.Current.List.GetItems(query);
// now iterate through the items collection
Limit the number of returned columns.
SPQuery query = new SPQuery(); query.ViewFields = "";
Query specific items using CAML
SPQuery query = new SPQuery(); query.Query = “15”;
You can use contains for retrieval of multiple values
This is very interesting topic and this actually need to be considered during the design phase of any project as this will drive the performance of your application.
To make more clear, SharePoint2010/2013 allows to query5000 items not the2000.
There are multiple ways you should actually manage the list in such a way sthat you could avoid this situation.like you create folders or create index on the fields on which you are going to write where clause.
I would refer following link to guide you on possible solutions and avoid problems:
http://apmblog.compuware.com/2010/03/18/how-to-avoid-the-top-5-sharepoint-performance-mistakes/
I would also refer the boundary condition link to you so you can plan the data structure in sharepoint site accordingly:
http://technet.microsoft.com/en-us/library/cc262787.aspx