Subject | Re: [firebird-support] GUID as PK |
---|---|
Author | Alexandre Benson Smith |
Post date | 2007-10-19T01:04:47Z |
Alan McDonald wrote:
selectivity available :-)
I think you have written wrong and meant "size" or "compactness" instead
of selectivity.
The number of index entries on a page will be of course small when one
uses a UUID/GUID instead of a integer. I don't have numbers about how
compression goes on a series of UUID/GUID values (since it's "random"
the redundant data should be small and has poor compression). Maybe the
compression ratio is terrible, maybe not so bad as one expects, I don't
know... :-)
I think the OP should give a try and populate a table with UUID/GUID
values and use gstat to see the average size of the index entries
compared to integer fields.
see you !
--
Alexandre Benson Smith
Development
THOR Software e Comercial Ltda
Santo Andre - Sao Paulo - Brazil
www.thorsoftware.com.br
>> We just use GUIDs here for IDs (as our software runs in a 3-tierWell.. once it's a PK it could be only unique and so forth the best
>> environment
>> its better, because we can generate the ID on the client side), and aside
>> from the little problems mentioned by Alan (which aren't real problems) we
>> don't have any complaints.
>>
>
> you're aware that GUIDs provide poor indexing with FB's index trees don't
> you?
> Are you happy with your PK index selectivity?
> Alan
>
selectivity available :-)
I think you have written wrong and meant "size" or "compactness" instead
of selectivity.
The number of index entries on a page will be of course small when one
uses a UUID/GUID instead of a integer. I don't have numbers about how
compression goes on a series of UUID/GUID values (since it's "random"
the redundant data should be small and has poor compression). Maybe the
compression ratio is terrible, maybe not so bad as one expects, I don't
know... :-)
I think the OP should give a try and populate a table with UUID/GUID
values and use gstat to see the average size of the index entries
compared to integer fields.
see you !
--
Alexandre Benson Smith
Development
THOR Software e Comercial Ltda
Santo Andre - Sao Paulo - Brazil
www.thorsoftware.com.br