Return-Path: Delivered-To: apmail-db-ojb-dev-archive@db.apache.org Received: (qmail 87413 invoked by uid 500); 21 Aug 2003 20:02:19 -0000 Mailing-List: contact ojb-dev-help@db.apache.org; run by ezmlm Precedence: bulk List-Unsubscribe: List-Subscribe: List-Help: List-Post: List-Id: "OJB Developers List" Reply-To: "OJB Developers List" Delivered-To: mailing list ojb-dev@db.apache.org Received: (qmail 87349 invoked from network); 21 Aug 2003 20:02:18 -0000 Received: from pop.gmx.net (HELO mail.gmx.net) (213.165.64.20) by daedalus.apache.org with SMTP; 21 Aug 2003 20:02:18 -0000 Received: (qmail 18140 invoked by uid 65534); 21 Aug 2003 19:55:24 -0000 Received: from adsl-62-167-44-132.adslplus.ch (EHLO gmx.ch) (62.167.44.132) by mail.gmx.net (mp027) with SMTP; 21 Aug 2003 21:55:24 +0200 Message-ID: <3F452387.3060300@gmx.ch> Date: Thu, 21 Aug 2003 21:54:47 +0200 From: Jakob Braeuchi User-Agent: Mozilla/5.0 (Windows; U; Windows NT 5.0; en-US; rv:1.4) Gecko/20030624 X-Accept-Language: en-us, en MIME-Version: 1.0 To: OJB Developers List Subject: Re: performance: surpress m:n collection deletion on insert References: <6D48B8403D926449BDE8440EC7EEC46D01010DBD@max.ppinet.de> In-Reply-To: <6D48B8403D926449BDE8440EC7EEC46D01010DBD@max.ppinet.de> Content-Type: text/plain; charset=us-ascii; format=flowed Content-Transfer-Encoding: 7bit X-Spam-Rating: daedalus.apache.org 1.6.2 0/1000/N hi oli, your patch got lost. jakob oliver.matz@ppi.de wrote: >Hello, > >I have found and fixed a performance issue. > >Suppose you have a pc class A with a collection field >with itemClass B, and supose that collection is mapped to an >indirection table A_B. > >If you insert a fresh A instance with a null collection, >then this results in one INSERT statement for the A >table and one DELETE statement for the indirection table A_B. > >The latter should usually be superflous, since there should >not be any entries in the indirection table. If there are >ones, this is probably an error. > >In my proposed fix, I surpress the deleteMtoNImplementor() call >inside storeCollections(). > >If you consider this change of behaviour risky, then I would >like to propose to add a configuartion parameter that allows >to force the old behaviour. > >In my model, the proposed fix results in a significant >performance improvement because the class A has severall >collection fields which are mostly null. > >If you have another idea how to surpess the superflous calls, >I would like to know. > >What do you think? > >Olli > > >------------------------------------------------------------------------ > >--------------------------------------------------------------------- >To unsubscribe, e-mail: ojb-dev-unsubscribe@db.apache.org >For additional commands, e-mail: ojb-dev-help@db.apache.org > --------------------------------------------------------------------- To unsubscribe, e-mail: ojb-dev-unsubscribe@db.apache.org For additional commands, e-mail: ojb-dev-help@db.apache.org