I am in a big mess and see if I can get out of it. I have a database with all the primary keys in the tables defined in the uniqueidentifier columns. This was imposed on us, giving "security" as one of the reasons. Another, in my opinion, relatively worthy reason is that some of the tables are involved in replication.
I am browsing the database and I feel that one easily avoidable future performance bottleneck is the ability to add bigint increment bigint columns in all tables and make them primary keys (clustered). And somehow “attach” the pk-fk relationship properly. But keep the old columns for future reference.
Any suggestions / comments / denunciations in this regard? Our C # / MSSQL Server R2 / Linq environment.
EDIT: Looking at the comments, I realize that I left a few important details. All primary key fields of Guid are Clustered, and I do not use newsequentialId (we use Linq to SQL, primary keys are generated on the client side. When using replication, we were not sure about the ability to correctly generate sequential identifiers from different client environments without conflicts).
My "feeling" is due to the well-known fact that a clustered index in the guid column will lead to a high degree of fragmentation and will only worsen the situation as the database grows.
Also, I'm not trying to optimize now, but trying to fix a bad design to avoid future headaches when the database gets too big. I wanted to know if it's worth it now.
A useful discussion is also related to the problem here in this post , and more
Brian source share