Subject Re: [firebird-support] Varchar Size of Field and Index Performance
Author Lee Jenkins
Sasha Matijasic wrote:
>
>
> > Hi all,
> >
> > I am using GUID's for the PK's in my database. I also have a set of
> > domains
> > 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
> > performance
> > 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)
> > domain?
> >
>
> Hi,
> 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.
>

Thanks for the advise, Sasha. I have to ensure that this particular application
is portable between databases so I'll have to see how that translates to other
systems like MSSQL and MySQL.

Thanks again,

--

Warm Regards,

Lee

"When my company started out, we were really, really, really, really small.
Now...we're just really small."