Please start any new threads on our new
site at https://forums.sqlteam.com. We've got lots of great SQL Server
experts to answer whatever question you can come up with.
Author |
Topic |
yuvi
Starting Member
3 Posts |
Posted - 2014-05-14 : 07:28:09
|
hi,guid or int which is good.guid with nonclustered index column with NEWSEQUENTIALID() as default vs int column identity clustered index column on insert which will faster and on select with joins which be faster? |
|
Lamprey
Master Smack Fu Yak Hacker
4614 Posts |
Posted - 2014-05-14 : 12:18:13
|
quote: Originally posted by yuvi hi,guid or int which is good.
Both are good.quote: guid with nonclustered index column with NEWSEQUENTIALID() as default vs int column identity clustered index column on insert which will faster and on select with joins which be faster?
I'm not sure I understand your question. If you have a "nonclustered index column with NEWSEQUENTIALID" does that mean the table doesn't have a clustered index? In general tables with clustered indexes have better insert performance that heaps. So, I guess I'd say that the "int column identity clustered index column" would be better for inserts. I don't know if it's make a difference for joins given the way b-trees work.You could put together your own test and see what happens. That's be an easy way to see the difference, if any. |
 |
|
TG
Master Smack Fu Yak Hacker
6065 Posts |
Posted - 2014-05-14 : 16:49:21
|
probably a more significant difference between those two options is 16 bytes vs. 4 bytes. If you don't need more than about 2 billion unique values why not int? We'd need more information about the table and how it will be used to really answer your performance questions.Be One with the OptimizerTG |
 |
|
|
|
|