Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Insert SP takes Forever
Message
From
25/02/2016 12:07:54
 
General information
Forum:
Microsoft SQL Server
Category:
Stored procedures, Triggers, UDFs
Environment versions
SQL Server:
SQL Server 2008 R2
Miscellaneous
Thread ID:
01632022
Message ID:
01632073
Views:
29
>>>>>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
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform