Page 1 of 1

Moving From db identity sequence to UUID's. Any Advice?

PostPosted: Wed Nov 14, 2012 10:43 pm
by chico
We're embarking on the task of moving to primary keys which use a UUID rather than a db identity sequence to be able to introduce syncing and offline functionality into our solution.

Does anyone have any do's or don'ts?

We are leaning toward making a new UUID PK column and the necessary UUID FK columns in our existing tables and NOT changing the existing column type and overwriting existing ID's with new ID's.

Is this a good idea?

Any better ideas?

Thanks.

Re: Moving From db identity sequence to UUID's. Any Advice?

PostPosted: Thu Nov 15, 2012 12:59 am
by mboegem
A definitely 'do' is try to generate the UUID directly via SQL
After that update al your new UUID fl-columns also using SQL

I used the above approach duplicating lots of records in order to copy metadata from 1 user profile to the other.
I don't remember the exact difference in speed doing it from within Servoy vs. raw SQL, but raw SQL managed to do this in just a couple of seconds (all depending on the number of records of course)

Another 'do' is:
if you didn't already used it, try to (re)write all your custom queries as prepared statements.