What is the size of a list item?

15 במרץ 2010

תגיות: ,
תגובה אחת

Ever wondered what’s the actual size on disk that a list item takes?
It might be useful fact to know when planning for capacity, or investigating free space issues.

Well.. If we think about it, a list item is just a row in the database.. isn’t it? Actually.. maybe it’s a few rows in different tables.. Wait, what about the item’s fields..?
Coming to think bout it, this method of calculating the different parts of a list item is too complicated. We need another method.

I actually used a different one. I used the StorageManagementInformation method of the SPSite object.
I used it do get an exact measurement of the size of lists in my site.

These were my findings: (for lists with 0 items)

List Type Size of list (in Bytes) Size of list (in Kb)
Announcements 12213 11.93
Links 12213 11.93
Custom 12213 11.93
Contacts 12213 11.93
Calendar 17511 17.10
Discussion 17511 17.10
Tasks 25468 24.86

It was interesting to see that not all lists were created equal, but that’s not the goal of this post.
For the rest of this study, I decided to concentrate on a list of type “Custom” (a custom list).

Now, that I had the basic numbers, I went ahead and added items to my custom lists.

I created an item, with one char in it’s title, then added one more char… and so on.
These were my findings:

# of chars in Title Size of list (in Bytes)
1 12243
2 12245
3 12247

Which brings me to the  conclusion that a single item takes 30 Bytes, and each additional character takes 2 more bytes.
Adding more items and more characters confirmed my findings, and provided a predictable way to calculate the item’s size.

Adding more fields to the list didn’t added additional size to the list items, but each char inside them added those 2 additional bytes, naturally.

Next step was to see how other type of fields behave.
I decided to concentrate on 3 field types: Text, Number, and Date. I noticed that field types such as Number and Date, are not effected by their content. Probably they reserve a specific amount of space in advance.

Field Type Size (in Bytes)
Single line of text 2 (Per char)
Number 8 (Fixed)
Date 8 (Fixed)

For conclusion, we now know some facts and numbers that can help us make size calculations. We know what is the base size of an empty list. We know how much each item costs us, and how much for a field.
We also know that StorageManagementInformation is an easy method to determine the size of lists.

הוסף תגובה
facebook linkedin twitter email

כתיבת תגובה

האימייל לא יוצג באתר. שדות החובה מסומנים *

תגובה אחת

  1. Tibag6ni28 באוקטובר 2013 ב 12:21

    khas512 [url=http://is.gd/U5k3v2]ugg outlet online[/url] Short Ugg Boots Uk SaleShort Ugg Boots Uk Stockists [url=http://tinyurl.com/lzjqort]cheap ugg[/url] Short Ugg Boots With BowShort Ugg Boots With Bow For Size 7Short Ugg Boots With Bow In Front.deakn2021 [url=http://doiop.com/4752c1]uggs for cheap[/url] gwqxr8731 [url=http://doiop.com/af1bo0]ugg sale[/url] Short Ugg Boots With Bow On SideShort Ugg Boots With Bows [url=http://tiny.cc/0hmh5w]ugg boots uk[/url] Short Ugg Boots With Bows In BackShort Ugg Boots With ButtonsShort Ugg Boots With Buttons On SideShort Ugg Boots With Buttons On The SideShort Ugg Boots With Zip.gsrkw0214 [url=http://goo.gl/5yS1R4]cheap ugg boots[/url] zurqn3810 [url=http://tinyurl.com/mnytrm8]ugg boots[/url] Short Ugg Boots With ZipperShort Ugg Boots With ZippersShort Ugg Boots WomenShort Uggs For WomenShort Uggs With Bows.

    הגב