Manage lists and libraries with many items

When a list or library has a large number of items, you must carefully plan its organization and how users need to access the data. By planning and using a few key list and library features, you can ensure that users can find information without adversely affecting the performance of the rest of your site.



Ways to manage large lists and libraries

When the number of items in a list or library approaches two thousand, the performance of the list or library may begin to slow down or adversely affect other areas of the site. Such issues can be caused by user actions such as sorting or retrieving a large number of items at the same time. However, you can store millions of items in lists and libraries as long as you plan and configure the list or library correctly.

The most common example of a user action affecting performance occurs when a user creates or accesses a view of the items in a very large list or library. When defining a view, you have the choice of returning all the items or filtering a subset of items based on a particular column. Any time the total number of items in a list or library is very large, it is important to limit the number of items that a user is working with at one time. This involves filtering the total set of items to a smaller number that is more manageable for the end user and for the database.

Depending on the type of list or library, you can use the organizational structure and certain features to help users to work with large numbers of items. The following sections provide tips and techniques for ensuring that users can access information quickly in a list or library.

Creating indexed columns

To improve the performance of a large list or library, you can index a column. An index on a column enables Windows SharePoint Services 3.0 to quickly analyze the data in that column, even when working with thousands or millions of items. For a view to quickly filter through a large number of items, the filter must be applied to a column that is indexed.

It is important to consider the following when you create and use indexed columns:

  • Each additional column index consumes extra resources in the database. Therefore, you should add indexes only to columns that will be used actively in views on the list or library.
  • When you define a view in a list or library with lots of items, it is important to use a filter that will return no more than two thousand items.
  • Only one indexed column can be used in a view filter. You can filter on many different columns, but it is important that the first column that you use to filter the view has an index and that it sufficiently reduces the total number of items returned.
  • Defining a view that uses an OR filter does not have any benefits of an indexed column.
  • Defining an item limit in a view does not have the same benefits as filtering by an indexed column.

Creating filtered views

For lists and libraries with large numbers of items, users can access the items with a mix of views and search. The following are some suggestions for views that work well with an indexed column:

  • Recently changed    To create a view of only the items that have changed in the past week, you can index the Modified column and then apply the filter Modified (Indexed) is greater than  [Today]-7.
  • New items    To create a view of only those items that were added in the past week, you can index the Created column and then apply the filter Created is greater than [Today]-7.
  • My items    To create a view of only those items that you added, you can index the Created By column and then apply the filter Created By is equal to [Me].
  • Due today    For lists or libraries with a Due Date column, you can index that column and then apply the filter Due Date is equal to [Today].
  • Discussion board updates    To create a view of only the discussions that were updated in the past month, you can index the Last Updated column on a discussion board, create a new Subject view, and then apply the filter Last Updated is greater than [Today]-30.
  • People and Groups    If you have a lot of people visiting your site, you can improve the performance of the All Groups and All People pages by indexing the Content Type column for the User Information List.

 Note   Even if only a few people appear on the All People page, many people visiting the site will result in inactive users being written to the User Information List, which can still affect the performance of this list.

Find links to more information about creating or changing views and about formulas and functions that you can use to filter views in the See Also section.

 Note   Because creating views that use a column index correctly is more complicated for large lists and libraries, you might want to remove the Manage Personal Views permission from contributors for a large list or library. By removing this permission, you can prevent users from creating a view that spans all of the items and that might adversely affect the performance of the rest of the site.

Organizing items into folders

Even when the total number of items in a list or library is very large, a view of a single folder is as fast as a view that filters the total number of items by using an indexed column. In some scenarios, it may be possible to distribute all of the items in a list or library into multiple folders such that no folder has more than two thousand items.

It is important to consider the following when you use folders to organize a large list or library:

  • Each folder must contain no more than two thousand items to ensure fast views of the items in the folder.
  • If you choose to display all items without folders when you create a view in this list or library, you must use a filter that is based on an indexed column.
  • It is useful to make the default view show all the available folders without any filtering, so that users can choose the appropriate folder when they insert new items. This prevents items from being incorrectly added outside the folders in the list or library.

Top of Page Top of Page

Index a column

To improve the performance of a large list or library, you can index a column. Then you can use the indexed column to filter new or existing views of the list or library.

 Note   Each additional column index consumes extra resources in the database. Therefore, you should add indexes only to columns that will be used actively in views on the list or library.

  1. If the list or library is not already open, click its name on the Quick Launch.

If the name of your list or library does not appear, click View All Site Content, and then click the name of your list or library.

On the Settings menu Settings menu, click List Settings, or click the settings for the type of library that you are opening.

For example, in a document library, click Document Library Settings.

  1. Under Columns, click Indexed columns.
  2. Select the check box next to each column that you want to index.
  3. Click OK.

 Important   Please note that a Lookup column that has been set to “Allow multiple values” cannot be indexed and will not appear on the Indexed Columns page.

 Tip   If you have a lot of people visiting your site, you may want to index the Content Type column for the User Information List. This can improve the performance of the All Groups and All People pages on the site. These are pages that you use to manage users and groups on your site.

Top of Page Top of Page

Create a filtered view by using an indexed column

After you index a column, you can add it to a new view as you create the view and then use the indexed column to filter the view. Before creating a view, you may want to add more columns to enable more flexibility for sorting, grouping, and filtering. If you are creating a view for a mobile device, you should consider the limits of your group's mobile devices. Find links to more information about creating columns and views in the See Also section.

  1. If the list or library is not already open, click its name on the Quick Launch.

If the name of your list or library does not appear, click View All Site Content, and then click the name of your list or library.

  1. On the View menu View menu, click Create View.
  1. Under Choose a view format, click the type of view that you want to create. For most situations in libraries, you can click Standard View, but you can choose other views for specific situations.
  2. In the View Name box, type a name for your view, such as Sorted by Last Name.
  1. In the Filter section, click Show items only when the following is true, and then choose how you want to filter the items based on one of the columns that is indexed. For example, to create a view of only items that changed today, choose the Modified (Indexed) column and the is equal to condition, and then type [Today].

 Note   If you do not see any columns that say (Indexed) after the name, you do not have any indexed columns available for that list or library. You must index a column first.

  1. Choose any other options that you want for your view, such as which columns you want to show or hide and how you want to sort the items.
  2. Click OK.

Top of Page Top of Page

Add an indexed column to an existing view

After you index a column, you can add it to an existing view and then use the indexed column to filter the view.

  1. If the list or library is not already open, click its name on the Quick Launch.

If the name of your list or library does not appear, click View All Site Content, and then click the name of your list or library.

  1. On the View menu Menu image, click Modify this View.
  2. In the Filter section, click Show items only when the following is true, and then choose how you want to filter the items based on one of the columns that is indexed. For example, to create a view of only items that were changed today, choose the Modified (Indexed) column and the is equal to condition, and then type [Today].

 Note   If you do not see any columns that say (Indexed) after the name, you do not have any indexed columns available for that list or library. You must index a column first.

  1. Choose any other options that you want for your view, such as which columns you want to show or hide and how you want to sort the items.
  2. Click OK.

Top of Page Top of Page

Set limits for RSS Feeds

After RSS support is enabled in Central Administration and at the site collection level, you can enable and configure RSS support for the following types of lists in your sites: document libraries, picture libraries, form libraries, announcements lists, calendar lists, blogs, surveys, and discussion boards. When users access the RSS Feed for a list or library, this is similar to a view of all the items in the list. The default RSS view limits the number of items that are returned, based on the date that the item was last modified by using a filter on the Modified column. Just as with any other view, if the list or library has many items, it is important to index the Modified column if users access the RSS Feed.

Follow this procedure to change the number of items and days for which changes are included in an RSS Feed.

  1. If the list is not already open, click its name on the Quick Launch.

If the name of your list does not appear, click View All Site Content, and then click the name of your list.

  1. On the Settings menu Settings menu, click List Settings.
  1. In the Communications section, click RSS settings.

 Note   The RSS settings link is not available if RSS support is not enabled both in Central Administration and at the site collection level.

  1. In the Item Limit section, type the maximum number of items and days to include in an RSS Feed.
  2. Click OK.

Top of Page Top of Page

 
 
Applies to:
Windows SharePoint Services 3.0