Received: from localhost (postgresql.org [64.49.215.8]) by postgresql.org (Postfix) with ESMTP id 34350475C8B for ; Thu, 2 Jan 2003 16:42:09 -0500 (EST) Received: from joeconway.com (unknown [63.210.180.150]) by postgresql.org (Postfix) with ESMTP id 85335474E53 for ; Thu, 2 Jan 2003 16:42:08 -0500 (EST) Received: from [192.168.5.3] (account jconway HELO joeconway.com) by joeconway.com (CommuniGate Pro SMTP 4.0.2) with ESMTP-TLS id 1499578; Thu, 02 Jan 2003 14:15:41 -0800 Message-ID: <3E14B1C7.9040007@joeconway.com> Date: Thu, 02 Jan 2003 13:40:23 -0800 From: Joe Conway User-Agent: Mozilla/5.0 (Windows; U; Windows NT 5.0; en-US; rv:1.2) Gecko/20021126 X-Accept-Language: en-us, en MIME-Version: 1.0 To: Hilmar Lapp Cc: Tom Lane , pgsql-performance@postgresql.org Subject: Re: join over 12 tables takes 3 secs to plan References: In-Reply-To: Content-Type: text/plain; charset=us-ascii; format=flowed Content-Transfer-Encoding: 7bit X-Virus-Scanned: by AMaViS new-20020517 X-Archive-Number: 200301/15 X-Sequence-Number: 662 Hilmar Lapp wrote: > As an added note, appreciating that query optimization is a difficult > problem, and I do think PostgreSQL is a great product. Having said > that, I've written 16-table joins for Oracle and always found them to > plan within a second or two, so that's why I thought there's nothing > special about the query I posted ... I'm not saying this to be bashful > about PostgreSQL, but rather to suggest that apparently there are ways > to do it pretty fast. I could be wrong, but I believe Oracle uses its rule based optimizer by default, not its cost based optimizer. A rule based optimizer will be very quick all the time, but might not pick the best plan all the time, because it doesn't consider the statistics of the data. Any idea which one you were using in your Oracle experience? Joe