Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
GUID as PK
Message
From
08/12/2005 13:35:36
Keith Payne
Technical Marketing Solutions
Florida, United States
 
 
To
08/12/2005 10:27:09
Mike Yearwood
Toronto, Ontario, Canada
General information
Forum:
Microsoft SQL Server
Category:
Other
Title:
Miscellaneous
Thread ID:
01075523
Message ID:
01076308
Views:
28
>One question. Are you just grabbing the int vs the guid field or are you grabbing other columns as well? Suppose you grab 100 characters of data from the row for the int, then the guid would only be 112 chars. How much longer can that take?
>
>>Some informal test results:
>>
>>(Details of execution plans and time statistics are here http://tms-us.com/Test%20results/INT%20vs.%20GUID%20Test%20Results.txt )
>>
>>Configuration:
>>1xP4 3.0 Ghz, 2GB RAM, Seagate ST380013AS (80GB), SQL2005 9.0 RTM
>>Total execution time:
>>INT: 2:21
>>GUID 2:45
>>
>>Configuration:
>>8xAMD Opteron, 8GB RAM, SAN, SQL2000 sp4
>>Total execution time:
>>INT: 1:18
>>GUID: 1:23
>>
>>Much of the execution time in the two scripts is spent creating the tables and indexes, inserting the static test data, reindexing, compiling the stored procedure, etc..
>>
>>The real story is in the execution times from STATISTICS TIME.
>>1xP4 execution times:
>>INT INSERT: 93490 ms
>>GUID INSERT: 112089 ms 16.59%
>>
>>INT SELECT: 3926 ms
>>GUID SELECT: 4677 ms 16.05%
>>
>>8xAMD execution times:
>>INT INSERT: 47829 ms
>>GUID INSERT: 65840 ms 27.35%
>>
>>INT SELECT: 2394 ms
>>GUID SELECT: 5881 ms 59.29% (WOW!)
>>
>>(Removed the wide code. It is available at the url above)

Mike,

The select statement has the id columns and other char and varchar columns in the column list.
SELECT
	m1.[id],
	m2.[id],
	d.[id],
	d.[Code1],
	d.[Data1],
	d.[Data3]
FROM
	[dbo].[PerformanceTestGUIDDetail] d
		inner join [dbo].[PerformanceTestGUIDMaster1] m1
			on m1.[id] = d.[ForeignKey1]
		inner join [dbo].[PerformanceTestGUIDMaster2] m2
			on m2.[id] = d.[ForeignKey2]
WHERE
	d.[Code1] = 'A'
ORDER BY
	d.[Code1],
	d.[Data1]
Previous
Reply
Map
View

Click here to load this message in the networking platform