Joel's SharePoint Architect Blog

SharePoint 2013 Training, Architecture, Administration and Development

Subscribe Subscribe  View Joel Jeffery's profile on LinkedIn
joelblogs.co.uk | joelj.co.uk | joeljeffery.co.uk | jfdiphoenix.co.uk

Category : SharePoint

AllUserData Table Changes in SharePoint 2013 Content Databases

Has anybody else noticed something’s changed with the schema of the Content Database in SharePoint 2013? The AllUserData table has changed.

Look, but don’t touch!

Try a SELECT * FROM AllUserData and see what you get:

SharePoint 2013 AllUserData Table

First of all, what’s happened to columns [nvarchar1], [nvarchar2] (skip a few) [nvarchar64]? How about [int1] to [int16]?

They’ve all been combined into a fragment of Xml, and stored in a single column [tp_ColumnSet].

Let’s zoom in and have a look at one of those Column Sets:

tp_ColumnSet from AllUserData Table

That’s interesting.

Wide List Issues

Firstly, this means “wide lists” are going to be potentially faster than under 2010. A “wide list” in SharePoint 2010 was one that had so many columns that it would cause an INSERT or UPDATE statement to affect more than 8000 bytes of row data.

To work around the problem, when SP2010 works out the column you’re about to add to a list could cause more than 8000 bytes to be written, it would instead create an additional row to hold the new columns. SharePoint used the [tp_RowOrdinal] column to number each of the rows accordingly for a wide list.

We expect SQL Server to start table locking the AllUserData table as the number of row locks approaches 5000. Wide list behaviour would potentially cause SQL Server to have locky behaviour at one-half as many rows (or one-third, or one-quarter – depending upon how many list columns and therefore SQL rows).

Now it’s all stored in one big column, that particular problem is going to go away.

I was bored, so I added 66 text columns to a list. It was all stored in one row, in that one column.

Wide List

However, the [tp_RowOrdinal] column still exists in the SharePoint 2013 content database, and I’m not sure why.

SharePoint 2013 Content Databases and Sparse Columns

SQL 2008, 2008R2 and SQL 2012 all support “sparse columns” and “column sets“. These are SQL technologies that allows a row to grow beyond the usual 8K-per-row limit (up to 2GB of data when expressed as Xml). Under the hood, the AllUserData table still has [nvarchar1] through to [nvarchar64] and beyond! In fact there are 262 nvarchars, 1000 bits, 550 datetimes, 550 floats, 750 ints, 262 ntexts, 262 sql_variants, 350 uniqueidentifiers and 2 geographies (in a pear tree). (Thank you to Lior Gal for pointing me in the right direction!)

See the MSDN reference article on SharePoint 2013 AllUserData table design here: http://msdn.microsoft.com/en-us/library/hh625524.aspx.

But why didn’t these show up in SQL Management Studio? This is behaviour by designer to prevent poor performance when selecting form wide tables.

AllUserData Performance Issues in SharePoint 2013

Three general observations:

  1. For list sizes below 5000 SQL rows, lists that don’t use SharePoint indexed columns will probably be slower.
  2. For lists greater than 5000 SQL rows, unless we’re using SharePoint column indices in our query, SharePoint list throttling should kick in, and terminate the query before it gets started.
  3. For most list use cases, it is still massively important to use SharePoint column indices. But if you do decide to switch off throttling for a list, performance should be faster than under SharePoint 2007.

So, in summary: even in SharePoint 2013, make sure you have suitable indexed columns.

Technorati Tags: SharePoint 2013, SharePoint Architecture

List of Best SharePoint Blogs

Are you reading these blogs? If not, you should be!

And, of course, (at the risk of great hubris) if anyone thinks mine deserves a nomination or a +1 I wouldn’t object. :o)

SharePoint Blogs

SharePoint Blogs

SharePoint blogs to help new and experienced developers, business users get up to speed. Sorry - but trying to keep it to English language blogs at the moment.

    • crowd rank
    • curated
    • alpha
    • newest
    • queue
    1. Furuknap's SharePoint Corner

      Furuknap's SharePoint Corner

      From his blog - "I am a SharePointaholic, spending much of my time with exploring and teaching SharePoint. I am the acting dean and a faculty member of USPJ Academy, the world's first SharePoint university (http://uspja.com/). I work as lead editor of SharePoint Magazine (http://sharepointmagazine.net/) where I also publish most of my SharePoint articles these days. In addition, I work as a consultant, doing SharePoint development and solutions architeture."

    2. Marc D Anderson's Blog

      Marc D Anderson's Blog

      A Knowledge Management Zealot Speaks Out

    3. NothingButSharePoint.com

      NothingButSharePoint.com

      "NothingButSharePoint.com (NBSP) was started in December of 2010 by combining the resources of three existing sites: SharePointDevWiki.com, EndUserSharePoint.com and SharePoint Joel.com. Our mission is to be the world's largest SharePoint Community, open to every level of SharePoint user.

    4. SharePoint Analyst HQ

      SharePoint Analyst HQ

      Great blog for power users, end users and business analysts. Michael has a very clear writing style and covers a topic really well. One of my personal favourites.

    5. Collaboris SharePoint Blog

      Collaboris SharePoint Blog

      'How To SharePoint' blog is brought to your by Collaboris and explains how to do common tasks in SharePoint, ranging from novice to development using Powershell and .Net.

    6. Absolute SharePoint Blog

      Absolute SharePoint Blog

      A blog made by a SharePoint Professional Consultant. This blog gives a lot of information about SharePoint

    7. SharePoint-Community.Net

      SharePoint-Community.Net

      The aggregated blog from the SharePoint community

    8. Kerem Ozen's Blog

      Kerem Ozen's Blog

      Kerem Özen, MCPD, PMP, works as a Senior Software Engineer and Lead Developer for STM A.S, a Microsoft Gold Partner based in Ankara, Turkey. With over 10 years’ experience developing, designing and implementing Internet-based software, Kerem has spent his past five years designing and developing SharePoint portal solutions. His recent focus has been on project management, Agile and Scrum methodologies.

    9. Spencer Harbar's blog

      Spencer Harbar's blog

      Spencer Harbar: Thoughts on SharePoint from a Microsoft Certified Architect.

    10. SharePointEduTech

      SharePointEduTech

      Dave has 19 years working in the IT industry with 12 of those working in the education sector and i have worked with many versions of Windows server, Exchange, SQL Server. Over the last few years i have been specializing in SharePoint starting with SharePoint team services back in 2001 through SharePoint portal server 2003 with Class Server, SharePoint 2007 and now SharePoint 2010 after introducing SharePoint into Twynham and making it a key component of their IT strategy.

    View more lists from Mark Jones

    Just Passed My SharePoint 2013 MCSE!

    Over the last two days I sat exams 70-331 and 70-332 (Core and Advanced Solutions of SharePoint 2013). Along with my MCSA for Windows Server 2012 (exams 70-410, 70-411 and 70-412) I am now an MCSE for SharePoint 2013! Yay me!

    Microsoft Certified Solutions Expert SharePoint 2013MCSA: Windows Server 2012 Solutions Associate

     

    Technorati Tags: Certification, MCP, MCSA, MCSE, SharePoint 2013

    This question was asked by one of my (most excellent) students this week:

    In an ASP.NET Web Part for SharePoint, when I override CreateChildControls(), do I need to invoke the base?

    You will see many examples on the Internet of code that does invoke the base, and many counter examples. Some of these contradictory examples are on the Microsoft MSDN site!

    I decided to take ILSpy to the System.Web.dll assembly and find out once and for all.

    First of all, System.Web.UI.WebControls.WebParts.WebPart does not override CreateChildControls() itself.

    System.Web.UI.WebControls.WebParts

    So, we must take a look at it’s ancestor: Part.

    System.Web.UI.WebControls.WebParts.Part

    Once again, there is no implementation for CreateChildControls() here, so we go further up the chain to System.Web.UI.WebControls.Panel:

    System.Web.UI.WebControls.Panel

    Still no definition of CreateChildControls(). Further up, we get System.Web.UI.WebControls.WebControl.

    System.Web.UI.WebControls.WebControl

    But it is not until we get to System.Web.UI.Control that we have an implementation:

    System.Web.UI.Control

    Hang on a moment! That’s empty!

    // System.Web.UI.Control
    /// <summary>Called by the ASP.NET page framework to 
    /// notify server controls that use composition-based 
    /// implementation to create any child controls they contain
    /// in preparation for posting back or rendering.</summary>
    protected internal virtual void CreateChildControls()
    {
    }

    So, the simple answer appears to be:

    No, you don’t need to invoke base.ControlChildControls() in an ASP.NET WebPart”

    Technorati Tags: ASP.NET, Development, SharePoint 2010, SharePoint Development

    SharePoint Doctors - Live SharePoint Help for Admins and DevelopersWe’ve just launched a new service!

    If you’re a SharePoint Administrator, and you need help with installing or configuring SharePoint

    If you’re a SharePoint Developer, and you want SharePoint Development help to know the best way to code a particular SharePoint solution…

    If you’re a SharePoint Power Information Worker, and you’re stuck for help with SharePoint Designer, workflows, Excel Services, Access Services or InfoPath

    …then you might just need the SharePoint Doctors!

    We are certified SharePoint subject matter experts with real world SharePoint experience, and we’re Microsoft Certified Trainers.

    We’re on call for live SharePoint support through video chat and desktop sharing, Monday to Friday, these hours:

    GMT: 8am – 8pm

    CET: 9am – 9pm

    EST: 5am – 5pm

    PST: 1am – 1pm

    EDT: 6pm – 6am

    By prior arrangement, we can also take bookings outside these hours.

    Help is available from $100 for a 30 minute consultation, with video chat based live assistance and screen sharing. You can also book us for 30 minute, 1 hour, half and full-day appointments.

    Visit sharepointdoctors.com for more information, and check out our credentials!