to the byte size of those chars compared to integers).
but if speed isnt that big of an issue you are fine.
it gets problematic in the 10000 to 50000 record area
everything from then on you will really feel - especially with some
more joins going on
in one project the boss wanted to use UUIDs everywhere. database size
is more than twice it would be with AIIDs (due to many foreign_id
fields).
I personally favor a mix (only there where necessary)
but that has other downsites or limitations. so in the end it is a
matter of personal preference as long as the data stays in a specific
range.
On 29 Feb., 15:53, Ighor Martins <ighor.mart...@gmail.com> wrote:
> Hello,
>
> I was thinking about the use of integer as primary key of the table or use
> a char(36) as UUID in the entire project,
> What I dont like about the integer, is the auto increment number, So I
> decided to use char(36) 'cause cake automatically fill it with an UUID, but
> I dont know if this can slow down the search in DB.
>
> So, anyone who used this before, please tell me about that.
> Is that right to use this in tables like: Users, Cars, Categories?
>
> Thanks.
--
Our newest site for the community: CakePHP Video Tutorials http://tv.cakephp.org
Check out the new CakePHP Questions site http://ask.cakephp.org and help others with their CakePHP related questions.
To unsubscribe from this group, send email to
cake-php+unsubscribe@googlegroups.com For more options, visit this group at http://groups.google.com/group/cake-php
No comments:
Post a Comment