Re: [Wonder-disc] ERXLongPrimaryKeyFactory (long primary keys)
Re: [Wonder-disc] ERXLongPrimaryKeyFactory (long primary keys)
- Subject: Re: [Wonder-disc] ERXLongPrimaryKeyFactory (long primary keys)
- From: Anjo Krank <email@hidden>
- Date: Fri, 30 Jun 2006 09:01:25 +0200
Am 30.06.2006 um 08:51 schrieb Guido Neitzer:
Currently I'm working on a project where I really don't know how big
some tables in a database may become (some of them may become really
big), so I'm not sure whether I should go with integer primary keys
(32 Bit) and I'm also not sure whether to go with db created primary
keys (perhaps issues when using a multi master cluster).
It is used by the project that I got in January. The main feature is
that it does some auto-encoding of entities and hosts, which makes it
possible to have multiple DBs and sync them later on. I still don't
like it, as it increases the number of PKs with each start of the app
by 1000, which is a bit wasteful (granted, with 64 bit you have a lot
of room, though) and you need to call it directly, as opposed to
simply override the DBC delegate where it would rather belong in.
So if I get some time, thereĀ“s some refactoring due here....
For now I have chosen to use 24 byte binary primary keys generated by
EOF, but I'm not really happy with them. They are hard to use with
other tools, even when just doing some fetches for one row in the db
tool just to test something.
We use these for our main product. Works quite well when you use PG
with the hex-encoded keys. A pain when you don't. Also, performance
may or may not be impacted. And they are also wasteful as half of
these 24 bytes are zero.
Cheers, Anjo
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Webobjects-dev mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden