Re: Batching creation of primary keys with Oracle
Re: Batching creation of primary keys with Oracle
- Subject: Re: Batching creation of primary keys with Oracle
- From: Mike Schrag <email@hidden>
- Date: Fri, 25 Apr 2008 15:41:34 -0400
I will second this ... It doesn't seem like it would matter much, but
in bulk operations, especially, it actually ends up being a pretty
significant cost. I added batch key generation to FB a while back and
it was a big win.
ms
On Apr 25, 2008, at 2:04 PM, Ken Anderson wrote:
Guido,
It's definitely the primary key fetch. We're saving batches of 100+
objects, where 90% of the objects are the same entity. It
iteratively calls the Oracle sequence to get them. Granted, Oracle
is very fast in doing this, but it's still adding up to a
significant amount.
Thanks for the tips...
Ken
On Apr 25, 2008, at 1:12 PM, Guido Neitzer wrote:
On 24.04.2008, at 20:27, Ken Anderson wrote:
Does anyone have a cookbook on how to fetch more than one primary
key at a time from Oracle sequences? I know there are some DB
plug-ins that do this for you automatically, but it doesn't seem
like the Oracle plug-in does. Ideally, I would like to be able to
set the size of the batches by entity, but I'd settle for a way to
at least get more than one at a time... my insert performance is
very poor.
Maybe take a look at either:
- the PostgresqlPlugin which does this
- ERXLongPrimaryKeyFactory (you might get ideas from there)
- EOF generated primary keys (24 Byte binary)
But maybe your insert performance is poor for other reasons that
getting primary keys, which normally isn't too slow even with one
round-trip per row. Have you checked other options? Like do you
have expensive indexes on the tables?
And how do you define "poor"?
cug
--
http://www.event-s.net
_______________________________________________
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
_______________________________________________
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