﻿<?xml version='1.0' encoding='UTF-8'?><rss version="2.0" xmlns:dc="http://purl.org/dc/elements/1.1/"><channel><title>SQLServerCentral / SQL Server 2008 / SQL Server 2008 - General  / Using GUIDs as primary keys/clustered indexes / Latest Posts</title><generator>InstantForum.NET v2.9.0</generator><description>SQLServerCentral</description><link>http://www.sqlservercentral.com/Forums/</link><webMaster>notifications@sqlservercentral.com</webMaster><lastBuildDate>Sun, 19 May 2013 22:58:53 GMT</lastBuildDate><ttl>20</ttl><item><title>RE: Using GUIDs as primary keys/clustered indexes</title><link>http://www.sqlservercentral.com/Forums/Topic1353815-391-1.aspx</link><description>If the keys are generated by a column default, you can use NEWSEQUENTIALID.</description><pubDate>Wed, 05 Sep 2012 10:35:30 GMT</pubDate><dc:creator>Ed B</dc:creator></item><item><title>RE: Using GUIDs as primary keys/clustered indexes</title><link>http://www.sqlservercentral.com/Forums/Topic1353815-391-1.aspx</link><description>Clustered indexes are best suited to columns most frequently used in range-based searches (e.g. MyDateColumn BETWEEN @Date1 AND @Date2).Check all the queries run against the database to determine if there are any range-based (or exact) searches and allocate the clustered index accordingly.</description><pubDate>Tue, 04 Sep 2012 07:34:13 GMT</pubDate><dc:creator>Stewart "Arturius" Campbell</dc:creator></item><item><title>RE: Using GUIDs as primary keys/clustered indexes</title><link>http://www.sqlservercentral.com/Forums/Topic1353815-391-1.aspx</link><description>[quote][b]Sapen (9/4/2012)[/b][hr]...In my scenario what can you think will be a best column that I can have the primary key on.Thanks for your inputs in advance.[/quote]By default primary key creates clustered index. But you create primary key with non-clustered index and create clustered index on some other column.</description><pubDate>Tue, 04 Sep 2012 05:59:18 GMT</pubDate><dc:creator>Suresh B.</dc:creator></item><item><title>RE: Using GUIDs as primary keys/clustered indexes</title><link>http://www.sqlservercentral.com/Forums/Topic1353815-391-1.aspx</link><description>I will also be adding few maintenance jobs on this database that will actually purge data from this database on a daily basis and we are using Entity framework scripts for this application and those huge scripts will be doing heavy inserts and updates on some of these tables daily. So performance is what my major concern is.</description><pubDate>Tue, 04 Sep 2012 05:20:58 GMT</pubDate><dc:creator>Sapen</dc:creator></item><item><title>Using GUIDs as primary keys/clustered indexes</title><link>http://www.sqlservercentral.com/Forums/Topic1353815-391-1.aspx</link><description>Hi All,One of my production databases has 120 tables out of which 104 tables are using GUIDs as clustered indexes. This is a brand new database and we are still in the process of making changes. Looking at the size of the database (30MB) this is not an issue now but this is expected to grow to more than a 100 GB with in a few days time. My only concern is that use of GUIDs causes heavy fragmentation and I am thinking if we can avoid this. Per our developers requirements they cannot use identity values in place of GUIDS. In my scenario what can you think will be a best column that I can have the primary key on.Thanks for your inputs in advance.</description><pubDate>Tue, 04 Sep 2012 05:06:14 GMT</pubDate><dc:creator>Sapen</dc:creator></item></channel></rss>