X-Original-To: pgsql-performance-postgresql.org@localhost.postgresql.org Received: from localhost (unknown [200.46.204.2]) by svr1.postgresql.org (Postfix) with ESMTP id F1671D1B4F4 for ; Wed, 29 Oct 2003 19:52:00 +0000 (GMT) Received: from svr1.postgresql.org ([200.46.204.71]) by localhost (neptune.hub.org [200.46.204.2]) (amavisd-new, port 10024) with ESMTP id 89174-02 for ; Wed, 29 Oct 2003 15:51:31 -0400 (AST) Received: from pallas.eruditorum.org (pallas.eruditorum.org [63.251.136.85]) by svr1.postgresql.org (Postfix) with ESMTP id CA3DCD1B4E9 for ; Wed, 29 Oct 2003 15:51:29 -0400 (AST) Received: by pallas.eruditorum.org (Postfix, from userid 500) id 6AA4E11325; Wed, 29 Oct 2003 14:51:15 -0500 (EST) Date: Wed, 29 Oct 2003 14:51:15 -0500 From: Jesse To: mallah@trade-india.com Cc: pgsql-performance@postgresql.org Subject: Re: PostgreSQL 7.4beta5 vs MySQL 4.0.16 with RT(DBIx::SearchBuilder) Message-ID: <20031029195115.GX7337@pallas.fsck.com> References: <33280.203.145.130.142.1067455363.squirrel@mail.trade-india.com> <33288.203.145.130.142.1067456744.squirrel@mail.trade-india.com> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <33288.203.145.130.142.1067456744.squirrel@mail.trade-india.com> User-Agent: Mutt/1.5.1i X-Virus-Scanned: by amavisd-new at postgresql.org X-Archive-Number: 200310/778 X-Sequence-Number: 4526 On Thu, Oct 30, 2003 at 01:15:44AM +0530, mallah@trade-india.com wrote: > Actually PostgreSQL is at par with MySQL when the query is being Properly Written(simplified) > > In mysql: > mysql> SELECT DISTINCT main.* FROM Groups main join Principals Principals_1 using(id) join ACL > ACL_2 on (ACL_2.PrincipalId = Principals_1.id) Interesting, last time I looked, this syntax wasn't valid on mysql. And I'm not familiar with the "using(id)" notation. Can you point me at proper docs on it? > > So its not just PostgreSQL that is suffering from the bad SQL but MySQL also. > But the question is my does PostgreSQL suffer so badly ?? > I think not all developers write very nice SQLs. > > Its really sad to see that a fine peice of work (RT) is performing sub-optimal > becoz of malformed SQLs. [ specially on database of my choice ;-) ] Can you try using SearchBuilder 0.90? That made certain optimizations to the postgres query builder that got backed out in 0.92, due to a possible really bad failure mode. Thankfully, because all of this is machine generated SQL we can just improve the generator, rather than having to retool the entire application. -- jesse reed vincent -- root@eruditorum.org -- jesse@fsck.com 70EBAC90: 2A07 FC22 7DB4 42C1 9D71 0108 41A3 3FB3 70EB AC90 "If IBM _wanted_ to make clones, we could make them cheaper and faster than anyone else!" - An IBM Rep. visiting Vassar College's Comp Sci Department.