Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Insert SP takes Forever
Message
De
25/02/2016 12:07:54
 
 
Information générale
Forum:
Microsoft SQL Server
Catégorie:
Stored procedures, Triggers, UDFs
Versions des environnements
SQL Server:
SQL Server 2008 R2
Divers
Thread ID:
01632022
Message ID:
01632073
Vues:
28
>>>>>What is the default value for the column? Check this blog post
>>>>>
>>>>>http://blogs.lessthandot.com/index.php/datamgmt/dbprogramming/best-practice-don-t-not-cluster-on-uniqu/
>>>>
>>>>
ALTER TABLE [dbo].[Transactions] ADD  CONSTRAINT [DF_Transactions_GUID]  DEFAULT (newid()) FOR [GUID]
>>>>
>>>>thanks, I'll read the blog.
>>>
>>>With NEWID() as default you definitely do not want to have it clustered.
>>
>>I should be able to change the default to newsequentialid(), but I think what happened here is that I was generating lots of records relying on the default, but the code actually uses .NET to generate the Guid and not rely on the default. I wonder if there is a newsequentialid for c#.... :)
>
>There is no newsequentialid in C# but I think I read about some implementations. Check this blog post
>
>http://blogs.msdn.com/b/dbrowne/archive/2012/07/03/how-to-generate-sequential-guids-for-sql-server-in-net.aspx
>
>David Browne is a great developer from MS and he is very helpful in MSDN forums. I also asked a few questions of him privately.

Thanks, I'd found various implementations of this.
Frank.

Frank Cazabon
Samaan Systems Ltd.
www.samaansystems.com
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform