[ckan-dev] strings as primary keys

Friedrich Lindenberg friedrich.lindenberg at okfn.org
Mon Feb 7 17:00:13 UTC 2011


Hi Will,

On Mon, Feb 7, 2011 at 2:37 PM, William Waites <ww at styx.org> wrote:
> 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.

I agree that using uuids as primary keys is a questionable design
decision, but it's one that is very deeply incorporated into CKAN and
that might come in handy once we start federating packages between
data catalogues.

While I share your concerns with regards to performance, its worth
noting that we do have indexes on all PKs and FKs. My feeling is that
we should wait for David Raznick to offer some performance
measurements/profiling information before considering to change this
:)

- Fr.




More information about the ckan-dev mailing list