db-ojb-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Jakob Braeuchi <jbraeu...@gmx.ch>
Subject Re: Extent Aware Path Expressions : An Innefficiency ?
Date Mon, 24 Feb 2003 16:37:05 GMT
hi charles,

i'll see what i can do to include each table only once in the join.

jakob

Charles Anthony wrote:

>Hi All,
>
>Back in January, Jakob did a much needed fix for extent aware path
>expressions :
>
>  
>
>>Date: Sun, 19 Jan 2003 12:59:28 +0100
>>From: Jakob Braeuchi <jbraeuchi@gmx.ch>
>>Subject: extent aware pathExpressions fixed
>>
>>hi all,
>>ojb now provides better support for extent aware path expression. only 
>>one sql is executed.
>>the sql containins one 'outer join' for each extent and one 'or' for 
>>each criteria:
>>    
>>
>
>  
>
>>SELECT DISTINCT A0.KategorieName,A0.Kategorie_Nr,A0.Beschreibung FROM
>>Kategorien A0
>>LEFT OUTER JOIN Artikel A1 ON A0.Kategorie_Nr=A1.Kategorie_Nr
>>LEFT OUTER JOIN BOOKS A1E0 ON A0.Kategorie_Nr=A1E0.Kategorie_Nr
>>LEFT OUTER JOIN CDS A1E1 ON A0.Kategorie_Nr=A1E1.Kategorie_Nr
>>WHERE
>>A1.Artikelname LIKE  'F%'  OR
>>A1E0.Artikelname LIKE  'F%'  OR
>>A1E1.Artikelname LIKE  'F%'
>>    
>>
>
>We are trying to use a path expression on a class which has many (well, 12)
>extents. All the extents are mapped to the same table.  This yields a sql
>statment something like 
>
>SELECT DISTINCT A0.KategorieName,A0.Kategorie_Nr,A0.Beschreibung FROM
>Kategorien A0
>LEFT OUTER JOIN Artikel A1 ON A0.Kategorie_Nr=A1.Kategorie_Nr
>LEFT OUTER JOIN Artikel A1E0 ON A0.Kategorie_Nr=A1E0.Kategorie_Nr
>LEFT OUTER JOIN Artikel A1E1 ON A0.Kategorie_Nr=A1E1.Kategorie_Nr
>LEFT OUTER JOIN Artikel A1E2 ON A0.Kategorie_Nr=A1E1.Kategorie_Nr
>LEFT OUTER JOIN Artikel A1E3 ON A0.Kategorie_Nr=A1E1.Kategorie_Nr
>LEFT OUTER JOIN Artikel A1E4 ON A0.Kategorie_Nr=A1E1.Kategorie_Nr
>LEFT OUTER JOIN Artikel A1E5 ON A0.Kategorie_Nr=A1E1.Kategorie_Nr
>[...]
>LEFT OUTER JOIN Artikel A1E11 ON A0.Kategorie_Nr=A1E1.Kategorie_Nr
>WHERE
>A1.Artikelname LIKE  'F%'  OR
>A1E0.Artikelname LIKE  'F%'  OR
>A1E1.Artikelname LIKE  'F%'  OR
>A1E2.Artikelname LIKE  'F%'  OR
>A1E3.Artikelname LIKE  'F%'  OR
>[...]
>A1E11.Artikelname LIKE  'F%'  OR
>
>This strikes me as likely to be pretty inneficient; as far as I can see,
>only one join per table should be needed. Am I wrong, and is this easy
>enough to ?
>
>Cheers,
>
>Charles.
>
>
>This email and any attachments are strictly confidential and are intended
>solely for the addressee. If you are not the intended recipient you must
>not disclose, forward, copy or take any action in reliance on this message
>or its attachments. If you have received this email in error please notify
>the sender as soon as possible and delete it from your computer systems.
>Any views or opinions presented are solely those of the author and do not
>necessarily reflect those of HPD Software Limited or its affiliates.
>
> At present the integrity of email across the internet cannot be guaranteed
>and messages sent via this medium are potentially at risk.  All liability
>is excluded to the extent permitted by law for any claims arising as a re-
>sult of the use of this medium to transmit information by or to 
>HPD Software Limited or its affiliates.
>
>
>
>---------------------------------------------------------------------
>To unsubscribe, e-mail: ojb-dev-unsubscribe@db.apache.org
>For additional commands, e-mail: ojb-dev-help@db.apache.org
>
>
>  
>


Mime
View raw message