Maximum number of attributes in Microsoft Dynamics CRM 4.0

Today I had a discussion about when to limit the number of attributes into Microsoft Dynamics CRM to gain with performances and I've observed that there's not always a clear idea on how SQL Server manages these things.

When you add a custom attribute on a CRM entity, Microsoft Dynamics CRM adds a new column on the corresponding table into the SQL Server database.

With SQL Server 2000, the maximum length of a table row was 8 KB. While this is still the physical maximum length of a page, SQL Server 2005 can move overflow varchar, nvarchar, varbinary, or sql_variant data to another page while maintaining a 24-byte pointer on the original data page, making it possible to store a row that contains more than 8 KB of data. To accommodate overflow in this way, each column in the row must have a maximum length of 8 KB. When the combined length of all the columns is greater than 8 KB, SQL Server will automatically move the largest column to an overflow page.

With the last Microsoft Dynamics CRM 4.0 the row size limit is bypassed because it supports only SQL Server 2005. However, remember that in order to have better performances, you should stay below the 8KB limit.

This little notes is obviously valid not only for CRM 4.0 but also for Microsoft Dynamics NAV and for every database tables in general. Don't spread too much with attributes...

Print | posted on Wednesday, March 26, 2008 10:25 PM

Comments on this post

No comments posted yet.

Your comment:

 (will show your gravatar)
 
Please add 7 and 4 and type the answer here: