X-Original-To: pgsql-jdbc-postgresql.org@localhost.postgresql.org Received: from localhost (mx1.hub.org [200.46.208.251]) by postgresql.org (Postfix) with ESMTP id D44F89FAA6E for ; Tue, 9 May 2006 22:06:12 -0300 (ADT) Received: from postgresql.org ([200.46.204.71]) by localhost (mx1.hub.org [200.46.208.251]) (amavisd-new, port 10024) with ESMTP id 83322-08 for ; Tue, 9 May 2006 22:06:01 -0300 (ADT) X-Greylist: delayed 09:18:37.974896 by SQLgrey- Received: from laurel.ipcon.de (dns.ipcon.de [195.50.149.130]) by postgresql.org (Postfix) with ESMTP id F37D69F9DCD for ; Tue, 9 May 2006 22:06:01 -0300 (ADT) Received: from localhost (localhost [127.0.0.1]) by laurel.ipcon.de (Postfix) with ESMTP id E76DD1B7E5C for ; Wed, 10 May 2006 03:05:59 +0200 (CEST) Received: from laurel.ipcon.de ([127.0.0.1]) by localhost (laurel.ipcon.de [127.0.0.1]) (amavisd-new, port 10024) with LMTP id 32378-01-2 for ; Wed, 10 May 2006 03:05:57 +0200 (CEST) Received: from [192.168.2.242] (cebunewcentury-gwy01.meridiantelekoms.net [125.60.248.2]) by laurel.ipcon.de (Postfix) with ESMTP id 7A3D01B7FFB for ; Wed, 10 May 2006 03:05:56 +0200 (CEST) Message-ID: <44613C70.1040706@ipcon.de> Date: Wed, 10 May 2006 09:05:52 +0800 From: Patric Bechtel User-Agent: Thunderbird 1.5.0.2 (Windows/20060308) MIME-Version: 1.0 To: pgsql-jdbc@postgresql.org Subject: Re: Query length restriction in v3 protocol? References: <4460B977.9070005@ipcon.de> <1147195173.32369.60.camel@archimedes> In-Reply-To: <1147195173.32369.60.camel@archimedes> X-Enigmail-Version: 0.94.0.0 Content-Type: text/plain; charset=ISO-8859-15 Content-Transfer-Encoding: 7bit X-Virus-Scanned: amavisd-new at ipcon.de X-Virus-Scanned: Maia Mailguard 1.0.1 X-Archive-Number: 200605/21 X-Sequence-Number: 15149 -----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1 Hi Mark, Mark Lewis schrieb am 10.05.2006 01:19: > This doesn't address your immediate problem, but the primary reason that > Hibernate joined-subclass performance stinks on PG is because the query > planner does a very poor job of optimizing outer joins, which Hibernate > uses extensively in its polymorphic queries for joined-subclass. > > One of the features coming in the 8.2 PG release is greatly improved > outer join planning, so you should be able to go back to joined-subclass > polymorphism, which is the easiest to work with in code anyway. Hm. "Easy" depends on the viewpoint. Granted, the table per concrete class is *very* easy to understand and insert/update performance is great. So far for the advantages. Drawback are the huge SQL queries in case of implicit polymorphism and the lack of constraints, which would be the reason to go back to normalized mapping after PG8.2. The outer join planning enhancements is in CVS already? If, I would give it a try... ;-) > There might also be a workaround you could use to get acceptable > performance out of joined-subclass using current versions of PG (Caveat: > I haven't tried this). When current versions of PG give up on > optimizing outer joins, they fall back to processing the joins in the > order listed in the SQL query. Depending on the order the joins are > listed, this could result in really bad performance. Hibernate always starts with the superclass down to the subclasses, so I think I cannot do something against it... (except for the ordering inside one level of inheritance inside one superclass). thanks already for the great 8.2 announcement, it lifts my hope... :-) - -- Mit freundlichen Gruessen / Regards Patric Bechtel, IPCON Informationssysteme OHG Kontakt: http://www.ipcon.de/kontakt.php -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.2.2 (MingW32) Comment: GnuPT 2.5.2 iD8DBQFEYTxwfGgGu8y7ypARAgkdAJ0eZ7UeiVJtk+coZ+L95GK8Ti39UgCgs9vU HMcO7yHXi/SFFPGLo0XalyE= =JjFA -----END PGP SIGNATURE-----