А не подскажете ли насколько эффективно использовать guid в качестве ключа ? Если нужно скажем сделать три-четыре join-a, то не лучше ли завести int primary keys, даже при наличии uniqueidentifier-ов ? SQL server 2000.
Здравствуйте, Аноним, Вы писали:
А>А не подскажете ли насколько эффективно использовать guid в качестве ключа ? Если нужно скажем сделать три-четыре join-a, то не лучше ли завести int primary keys, даже при наличии uniqueidentifier-ов ? SQL server 2000.
вот ответ на твой вопрос:
If you need to create a primary key (using a value meaningless to the record, other than providing a unique value for a record), many developers will use either a identity field (with an integer data type) or a uniqueidentifier data type. If your application is not sensitive to either option, then you will most likely want to choose the identity field over the uniqueidentifier field. The reason for this is that the identity field (using the integer data type) only takes up 4 bytes, while the uniqueidentifier field takes 16 bytes. Using the identifier field will create a smaller and faster index. [7.0, 2000] Added 8-5-2000
SQL Server Transact-SQL Performance Tuning and Optimization Tips