|Subject||RE: [firebird-support] Varchar Size of Field and Index Performance|
> Hi all,Hi,
> I am using GUID's for the PK's in my database. I also have a set of
> that I use across databases and pretty much standard data types.
> One of my domains is Varchar(50) and I'm curious if there is any
> impact since GUID's are 36 chars long.
> Is it recommended that I create a specific say Char(36) field for
> GUID's or is
> the difference negligible if I just stick with my standard Varchar(50)
the performance is more or less easily tested and you will see if either solution is acceptable for you, but if you are going to use guids you should really consider defining a domain as
create domain guid char(16) character set octets;
because that's what guids are, an array of 16 bytes. More over, Fb 2.1 introduces new built in function gen_uuid which returns exactly that.