December 5, 2003 at 2:10 am
Hi,
Most of my tables are using a surrogate key which is a GUID column and it's set as a primary key. No index used so far and there's heavy load on the tables.
Im planning to use index to speed up query. I come up with the decision whether or not I put index in the GUID column. I try to use clustered index on the GUID column as most tables joined thru this column. There're also other candidates for column indexing.
My question:
1. Is it Ok to put an index on a GUID col as its size maybe big? which type suitable for the index, clustered or non clustered?
2. Let's say I put a clustered index on the GUID col. and I want to put another nonclustered index on some other col. Would this cause much overhead?
Any thought would be appreciated much.
Thanks in advance
Hendry
December 5, 2003 at 5:39 am
Nothing wrong with that. Yes, its more overhead than an int, but that is just part of using a guid. Whether you should cluster it depends on whether you have another column that would be better suited, usually one that you do a range type query on.
Andy
December 5, 2003 at 6:24 am
This one might also be of interest http://www.sqlservercentral.com/forum/link.asp?TOPIC_ID=14025
Frank
--
Frank Kalis
Microsoft SQL Server MVP
Webmaster: http://www.insidesql.org/blogs
My blog: http://www.insidesql.org/blogs/frankkalis/[/url]
Viewing 3 posts - 1 through 2 (of 2 total)
You must be logged in to reply to this topic. Login to reply