Just little about C#, .NET, SQL Server, SharePoint and SAP

SharePoint 2010 – one million items in a list

Posted by zieglers on November 21, 2009

Just like most people, i downloaded and installed SharePoint 2010 last week. Unlike mentioned, I had no issues while installing on Windows 2008 R2 environment. It’s been a week and still no issues.

Looks like it’s going to take a while for me to get used to new ribbon interface. Definitely you get to see and do more with ribbon, but will take a some time to remember what is where.

Actually, main focus of this post is a lot mentioned new feature of SharePoint 2010. “Limitation on number of items stored in a list”  problem seems to be solved – Now, SharePoint lists can handle millions of items.

In order to see this, I decided to do a little experiment. My aim is firstly to insert one million items in a list successfully. As I write this post items are still being inserted, 731371 and still counting… So far it’s been 6 hours and still inserting.

I have to also mention that my experiment environment is done on a  Win 2008 R2 with 2 GB Ram and using an external usb hdd. So this waiting time can be way less if you try with a powerful workstation. Anyhow, how do I insert 1 million items to a list? Of course using PowerShell script..

Here is a very simple PowerShell script which inserts items to a list. This script is just assigning ‘Title’ column values: Item – ItemNo


// Set site url
$siteurl = “http://yourservername”

// get site obj
$mysite=new-object Microsoft.SharePoint.SPSite($siteurl)

// open root web
$spWeb = $mysite.OpenWeb()
// get test list obj
$spList = $spWeb.Lists[“TestList”]

// Insert 1 million items
$i = 1001

do { Write-Host “Item – “$i
         $spitem = $spList.Items.Add() 
         $spitem[“Title”] = $i.tostring()
while ($i -le 1000000)


Will update this post once insert operation is completed…

(next morning)

Ok, now i see insert operation is completed. As you can see below, one million list items are inserted into a list using PowerShell.

At this point I’d like to do some test re item select/update/delete operations. Also wondering how filtering is going to work in such a large list. If you have suggestions for other tests or things to check, please let me know, i’ll try to apply them as well. At the end, I’d like to have a some sort of comfort level while suggesting a client ‘one million item is ok in a SharePoint 2010 list’.

… to be continued…



2 Responses to “SharePoint 2010 – one million items in a list”

  1. interesting post, thanks 🙂

  2. […] a simple powershell script to bulk-insert items into the list. You can find this script in this post, where I was trying to insert 1 million items to test List […]

Leave a Reply

Please log in using one of these methods to post your comment:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Google+ photo

You are commenting using your Google+ account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )


Connecting to %s

%d bloggers like this: