Resource Throttling in SharePoint 2010


List Threshold and throttling is a new feature in SharePoint 2010 lists.  This allow SharePoint administrator to block running heavy queries on SharePoint Lists which has thousands of items.  In SharePoint 2007 the max items that can be returned by a list view was about 2000 items and any query over that number can result in low performance and load on the server.  SharePoint 2010 lists has been optimized to support millions of items all together but provide SharePoint Administrators control over how many items are being retrieved from the lists at a time using User Interface or Object Model.

See the example below as we have a list with 6000 thousand items.  The default threshold limit is 5000 which can be changed in the Web Application Settings.

To set the resource throttling we need to go to Central Administration –> Application Management –> Manage Web application
click on the web application –> Click on the Ribbon and click the General settings Dropdown –> Select Resource Throttlling
image
There are different threshold values that we can specify

  • List View Threshold  – Minimum Items before Thread hold – Default is 5000
  • Object Model Override – Do you want to allow object model code to override the threshold and run an expensive query.  Default is Yes
  • List View Threshold for Auditors and Administrators – Maximum number of items in a view for a user who has sufficient permissions – Default is 20000
  • List View Lookup Threshold  –  The max number of columns that can be returned by a object model SPQuery.  Default is 6
  • Move-over you can also specify the time when you want to allow these expensive queries to run.

imageimage

Now when a list has items more than the threshold.  The settings page will show that the list has reached its threshold.
image
Go got List Settings using the ribbon.
image
image

What will I be doing at Gulf Developer Conference


Gulf Developer Conference will held on 13, 14 and 15th of December in Riyadh and I will be there.  But a question is “What I will be doing there?”.  The anwer to this question is pretty simple.

  • I will be Leading the Microsoft Technical Community Lounge
  • According to Microsoft “This event will be driven by the community” so we will doing many small presentation, events, chit chats, technical discussion and signups for our communities.  I will be leading the place as RSUG Lead with Muhammad Halabi Taking DLS Lead.
  • I will be available on SharePoint Technology Booth at the event for all 3 days to answer the toughest questions of the audience after the event.
  • I will be doing 3 Chalk Talk Session + many on spot SharePoint 2010 Demos 🙂
    • Building Dashboards with SharePoint… the good, the bad, the ugly
    • SharePoint 2010… what every developers needs to know!
    • Happy with SharePoint 2007?… things you need to know about SharePoint 2010!
  • I will be speaking in 2 Break out session.
    • Microsoft SharePoint Server 2010: What’s in it for Developers
    • Visual Studio Tools for SharePoint 2010

    There will be many raffle draws for different gifts during the event so please make sure you visit the community booth for get them.  Also take part in the chalk talk session to get the interesting learning experience.

    By the way.  GDC is free you can register and join us for the event without paying a single penny. 

    http://www.marcomarabia.net/ceventregister.asp?Evid=192

    Looking forward to see you there.

    Jerry

    Field and List Item Validation in SharePoint 2010 Lists


    SharePoint 2010 Lists support Field Validation which enables you to validate the values.  Field Validation allow you to “specify the formula that you want to use to validate the data in this column when new items are saved to this list. The formula must evaluate to TRUE for validation to pass. “

    Example: If your column is called "Company Name" a valid formula would be [Company Name]="My Company".

    To Test out the Validation go to the List and Select List from List Tools

    Click Create Column
    image
    The Enter Title of the Column and select type the type.  for this example I have a column name Employee Age which should be a number greater than 25
    image 
    Expand the validation section and Write your formula and message.  You should enter the try condition and message for wrong values.
    image
    Now Create or edit the existing item to test your formula
    image
    List item Validation Works same but we can write a formula to verify the item.  We can specify the formula you want to use to validate the data in this column when new items are saved to this list. To pass validation, the formula must evaluate to TRUE. For more information, see Formulas in Help.

    Example: =[Discount]<[Cost] will only pass validation if column Discount is less than column Cost.

    image
    For this example I created two currency columns GrossSalary and Netsalary and my formula is that Net salary should be less than Gross Salary. 
    image
    I entered 20000 as Gross and 30,000 in Net Salary so the error message is visible in the status pane.  The different between column or field validation and Item validation is that the wrong value message in field will be visible in front of columns.
    imageVery impressive 🙂