[Dbix-class] (OT) Do you use UUIDs?

Ben Staude sben1783 at yahoo.de
Sat Jun 30 10:18:49 GMT 2007


Hi all,

this is slightly off-topic, so if you know a better place for it, please let 
me know. On the other hand, the guys here know a lot about using Databases 
with perl...

I'm wondering whether to use UUID instead of auto-increment pk in my database 
(dbic, sqlite) app. Right now, I'm fine with the integer keys, but there 
might eventually come the day that I want to "split" and "merge" the 
database. As far as I understood, there's no better way to be prepared for 
such things than uuid-keys.

What are the drawbacks I have to expect if switching to uuid-keys? I know I'd 
have to add a dependency to Data::UUID (btw, is it the one to use?), but I 
can't estimate the performance impact on inserts (not that critical) and 
selects (< 100,000 records in the db). Disk space shouldn't be an issue.

Do you all use it everywhere, or do you avoid it wherever you can? Maybe 
there's some kind of "best practice" established? Using uuid-keys sounds 
reasonable, but I wonder why they don't appear in every schema on the list...

Thank you very much for any hints,

Ben



More information about the Dbix-class mailing list