• Not Answered

Sitecore SQL Database Tables and Primary Keys

Is it typical for a sitecore SQL database installation to include primary keys in the table creation process?

I ask because our current sitecore SQL database tables are indexed, but do not have any primary keys assigned.

Is there any reason why the primary keys might not be created?

2 Replies

  • I also have this question. I've found that the heaps (storing the table data) in our SQL Server instances gets very fragmented on large solutions. Rebuilding the indexes partly helps, but to organize the heap, a clustered index is needed.

    As a workaround, I create temporary clustered indexes to let SQL Server organize the heap and then drop it again. I haven't done any testing if it could be harmful to keep the clustered indexes.
  • Sitecore Uses Guid as Unique Key value and setting the ID as primary and auto increment wont work out. Id generation is done at instance level.
    Currently the Index is done as Unique in item Table.