[ckan-dev] strings as primary keys

William Waites ww at styx.org
Mon Feb 7 13:37:26 UTC 2011


Picking this up again, had discussed briefly in IRC a
while back. There were some changes that made the primary
key for most objects into strings (randomly generated
uuids). Where there are joins happening, joining on
strings may be less efficient than joining on the traditional
integer as auto-incrementing primary key.

What does the group think here? Is there likely to be
much efficiency gain by having "normal" primary keys and
having the uuid strings in a separate (indexed and with
unique constraint) column?

Relatedly, even as is, the relevant columns are of type
text which is going to be handled much less efficiently
than varchar(36).

This probably touches vdm as it does the same thing with
its revision tables.

Cheers,
-w
-- 
William Waites                <mailto:ww at styx.org>
http://river.styx.org/ww/        <sip:ww at styx.org>
F4B3 39BF E775 CF42 0BAB  3DF0 BE40 A6DF B06F FD45




More information about the ckan-dev mailing list