Additional features in
SharePoint 2010 lists allow for additional customization and
administration of list data. By providing support for large lists, site
columns, and advanced input forms, site administrators are able to
control not only the data into the list, but server resources, global
farm access to list data, and the methods users use to enter data into
lists.
1. Large List Support
SharePoint has traditionally
been able to support large lists; however, the challenge has always been
to make the data in large lists available for retrieval and display in a
timely and efficient manner. Although a user can create millions of
items in a SharePoint list, the query operation slows as the size of the
list grows. A new addition to SharePoint 2010 is large
list support throttling. Throttling allows farm administrators to set
manageable limits on the number of items queried from a SharePoint 2010
list. Using throttling, SharePoint 2010 encourages developers and farm
administrators to control large list queries to improve the performance
of a SharePoint farm.
Throttling
thresholds are set on site collections. By default, standard users are
throttled at 5000 items returned from a list, with a warning threshold
at 3000 items. (See Table 1
for a list of items that would be throttled.) These values can be
changed using Windows PowerShell commands. The throttling mechanic works
as follows: If a user is pulling back a list with 4999 items, the query
returns all of the data without error; however, if the user or query
tries to retrieve 5001 items, an expensive query exception will be
returned. The following parameters are set by default.
Warning for user throttling at 3000 items
Standard user throttling at 5000 items
Super user throttling at 20,000 items
Note:
Developers can request a throttle override from the Object Model by using SPQuery.RequestThrottleOverride and SPSiteDataQuery.RequestThrottleOverride, which will effectively cause SharePoint to ignore the throttling behavior.
Table 1. Items Throttled for a Standard User with Large List Support Throttling
NUMBER OF ITEMS RETURNED | QUERY RUN IN NORMAL LIST AS STANDARD USER |
---|
<5000 list items | Code and/or view query will run and return the required result. |
>3000 list items | No exception is thrown and the code will run properly. |
>5000 list items | An expensive query exception is thrown. |
>5000 list items during time window OK for large queries | Query threshold is not applied, query runs even if the threshold has been exceeded. |
Object Model Override = true and RequestThrottleOverride is overridden | Exception is thrown if list is throttled, and this property cannot be overridden by a normal user. |
Using Central
Administration, a farm administrator can configure a time frame in which
these expensive queries can and cannot be run. Therefore, if a user
wants to run a query with 5001 items at 5:30 P.M. and the time-frame
limitation is between 8:00 A.M. and 5:00 P.M., the query would succeed.
To see if a list is being throttled or within warning limits, go to List
Settings and look at the bar that gives the number of items in the
view/list.
To find out the current throttling limits, follow these steps.
Open a browser and go to the SharePoint Central Administration website.
Under Application Management, select Manage Web Application.
Select the Web application that you want to modify or view.
Click General Settings in the Ribbon and select Resource Throttling. Figure 1 shows the Central Administration Resource Throttling command on the General Settings menu.
Figure 2,
which displays list resource throttling parameters, is the first of
several pages of information you will see with resource throttling
settings. A farm administrator should be familiar with these settings
before any changes are made to a SharePoint site. Also, it’s important
to test all new settings in a development environment before applying configuration changes in production.
When upgrading from SharePoint
Server 2007 to SharePoint 2010, any list that contains a default view of
more than the throttled limit (default: 5000) will not be immediately
available until a new default view is created.
A farm administrator
should become familiar with the Windows PowerShell commands, which will
display and set the throttling limits. These commands are listed in Table 2, with examples.
Table 2. Windows PowerShell Commands for Displaying and Setting Throttling LimitsCOMMAND DESCRIPTION | EXAMPLE COMMAND |
---|
Get max threshold values for Web application | $sitecol = Get-SPSite http://mysharepointserver:5000
$sitecol.WebApplication.MaxItemsPerThrottledOperationWarningLevel
$sitecol.WebApplication.MaxItemsPerThrottledOperation
$sitecol.WebApplication.MaxItemsPerThrottledOperationOverride
$sitecol.WebApplication.AllowOMCodeOverrideThrottleSettings | Get max threshold values for Web application—example usage | $sitecol = Get-SPSite http://mysharepointserver:5000
$sitecol.WebApplication.MaxItemsPerThrottledOperationWarningLevel = 2000 (set throttle warning to 2000 items – default 3000)
$sitecol.WebApplication.MaxItemsPerThrottledOperation = 4000 (set throttle to 4000 – default 5000)
$sitecol.WebApplication.MaxItemsPerThrottledOperationOverride = 30000 (set super user throttle to 30000 – default 20000)
$sitecol.WebApplication.AllowOMCodeOverrideThrottleSettings = False (set code override for throttling to False – default True)
Note: Values in this section are for example purposes and are not recommendations | Find large list throttle setting | $siteCollection.RootWeb.Lists[“LargeListName”] (look for IsThrottled in results) |
|
In summary, SharePoint 2010 large list support will support lists with
Up to 50 million items—during read operations
Configuration options for administrators per Web applications
Privileged operational override support for users with site collection or list administration privileges
Default query restrictions
Throttling when a list reaches a predefined of items
2. Site Columns
In traditional database
application development, calls are often necessary that refer to a set
of table data multiple times during the application execution. By having
a single authoritative source for data, applications can ensure
consistency across all application modules. This is often true in
SharePoint as well—to keep consistency across the SharePoint farm, a
cross-site lookup column is required in some cases. Cross-site lookups
cannot be done using a standard lookup column, however, so a site column
should be used instead.
Site columns are
defined at the site collection level and are accessible to all sites
under the site collection. A few common examples of standard SharePoint
site columns are FTP Site and Gender. The FTP Site column is a URL field
in which a URL and description can be entered; a Gender column provides
the user a choice of Male or Female. In both cases, there is no
ambiguity about what the user will need to type across all SharePoint
sites. The primary advantage of using a site column is its ability to
provide a consistent user response for the column.
To link to an existing site column, complete the following steps.
Click List under the List Tools tab and then select List Settings.
Click Add From Existing Site Columns.
Select the site group All Groups.
Select the FTP Site column from Available Site Columns.
Click Add and then click OK.
2.1. Creating a Site Column
To create a new site column in SharePoint 2010 from the root of the site collection, complete the following steps.
Click Site Actions in the Ribbon and select Site Settings.
Click Site Columns under Galleries.
Click
Create. You will see a new page that you use to create the column,
setting the title, settings, and validation as necessary. When you have
finished selecting the settings for the new site column, click OK.
Note:
If, as the site administrator, you plan on creating many new columns, you should consider creating a new Site Column Group.
2.2. Modifying a Site Column
To modify an existing site column in SharePoint 2010 from the root of the site collection, complete the following steps.
Click Site Actions in the Ribbon.
Click Site Columns under Galleries.
Click the site column you want to modify.
Note:
As with lists, only
certain changes to the list type are supported, and content might be
lost when converting from one type to another, such as going from a
multiple lines of text type to a single line of text.
Change or edit the group if needed.
Change settings as needed.
Set
the Update All Columns Based Upon This Site Column option to Yes to
update all of the site columns. This operation can take a while to run,
and any customizations to child list settings might be lost.