473,320 Members | 2,162 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,320 software developers and data experts.

Guid as primary key

When using a Guid as your primary key in a table, does it make
sense to make it a clustered index?

Thanks,
Rick
Jul 20 '05 #1
1 3263
Depends on how the table is used. But if you do and if you are retrieving
many records at a time by PK and there is a good chance that those records
were created at the same time (for example an order details table), you may
want to generate the GUIDs using the 'old' GUID generation function
UuidCreateSequential.

http://msdn.microsoft.com/library/de...sequential.asp
"Rick" <ri**@abasoftware.com> wrote in message
news:28**************************@posting.google.c om...
When using a Guid as your primary key in a table, does it make
sense to make it a clustered index?

Thanks,
Rick

Jul 20 '05 #2

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

24
by: Ilija_G | last post by:
Hi, Is there any replace for "Select @@identity" that could return "just inserted" GUID as a primary key? Has anyone tested what's faster, working with Guid or Autonumber ?
3
by: Robert Chapman | last post by:
I know that this should be impossible, yet it is happening... I have some c# code that uses a method scoped variable of type Guid. The code assigns Guid.NewGuid() to the variable. This value is...
1
by: Leon | last post by:
Hi, I have SQL DB table with a GUID Primary key. i used the C# data form wizard to create a data form (though has a typed dataset) with a Grid (the GUID column is not shown on the grid). when the...
1
by: Omer kamal | last post by:
When in database(.mdb) the primary key have fields size type "Replication ID" it creates Guid. I tried to create string of Guid and insert it but did it not work. Control.databindings.add(),...
4
by: Grey | last post by:
I used .NET to generate a GUID for creating a new record in Access DB as primary key. Is it guaratee to be unique in the DB as the GUID is not generate in DB?? If so, is that mean GUID is generated...
12
by: Geoff Jones | last post by:
Hi How do I set a primary key to be a GUID? That is, using the following code, I can set an integer primary key, but how do I change it to a GUID? Dim databaseCommand As OleDbCommand = New...
14
by: Roy | last post by:
Is there an equivalent class function in C# to generate sequencial guid just like the NewSequentialID() function in SQL Server 2005?
8
by: Leon_Amirreza | last post by:
I have a column named "ID" and its type is "uniqueidentifier" in SQL Server 2005 Express. this column is the primary key and its default value is "newid()" in SQL Server. I have generated a...
1
by: Jeff | last post by:
ASP.NET 2.0 This problem occur using the basic version of SQL Server 2005 which get installed when installing Visual Studio 2005! I have inserted a record in the Test table. But when I try to...
4
by: Marc | last post by:
Hi, I don't get it I cannot get this to work, can somebody give me a hint Table1 contains a field Id which is a GUID as primary key and DATA a string, I want to insert a new row but it does not...
0
by: DolphinDB | last post by:
The formulas of 101 quantitative trading alphas used by WorldQuant were presented in the paper 101 Formulaic Alphas. However, some formulas are complex, leading to challenges in calculation. Take...
0
by: DolphinDB | last post by:
Tired of spending countless mintues downsampling your data? Look no further! In this article, you’ll learn how to efficiently downsample 6.48 billion high-frequency records to 61 million...
0
by: ryjfgjl | last post by:
ExcelToDatabase: batch import excel into database automatically...
0
by: jfyes | last post by:
As a hardware engineer, after seeing that CEIWEI recently released a new tool for Modbus RTU Over TCP/UDP filtering and monitoring, I actively went to its official website to take a look. It turned...
0
by: ArrayDB | last post by:
The error message I've encountered is; ERROR:root:Error generating model response: exception: access violation writing 0x0000000000005140, which seems to be indicative of an access violation...
1
by: PapaRatzi | last post by:
Hello, I am teaching myself MS Access forms design and Visual Basic. I've created a table to capture a list of Top 30 singles and forms to capture new entries. The final step is a form (unbound)...
0
by: Defcon1945 | last post by:
I'm trying to learn Python using Pycharm but import shutil doesn't work
0
by: Shællîpôpï 09 | last post by:
If u are using a keypad phone, how do u turn on JavaScript, to access features like WhatsApp, Facebook, Instagram....
0
by: Faith0G | last post by:
I am starting a new it consulting business and it's been a while since I setup a new website. Is wordpress still the best web based software for hosting a 5 page website? The webpages will be...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.