X-Original-To: pgsql-performance-postgresql.org@localhost.postgresql.org Received: from localhost (unknown [200.46.204.144]) by svr1.postgresql.org (Postfix) with ESMTP id 9797F5E46CA for ; Fri, 6 Aug 2004 22:12:02 -0300 (ADT) Received: from svr1.postgresql.org ([200.46.204.71]) by localhost (av.hub.org [200.46.204.144]) (amavisd-new, port 10024) with ESMTP id 78664-04 for ; Sat, 7 Aug 2004 01:11:53 +0000 (GMT) Received: from trofast.sesse.net (trofast.sesse.net [129.241.93.32]) by svr1.postgresql.org (Postfix) with ESMTP id F21B95E40BB for ; Fri, 6 Aug 2004 22:11:44 -0300 (ADT) Received: from sesse by trofast.sesse.net with local (Exim 3.36 #1 (Debian)) id 1BtFkS-0001k1-00 for ; Sat, 07 Aug 2004 03:11:48 +0200 Date: Sat, 7 Aug 2004 03:11:48 +0200 From: "Steinar H. Gunderson" To: pgsql-performance@postgresql.org Subject: Re: Question about Generating Possible Plans by the planner/optimizer Message-ID: <20040807011148.GA6617@uio.no> References: Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: X-Operating-System: Linux 2.6.6 on a i686 User-Agent: Mutt/1.5.6+20040722i X-Virus-Scanned: by amavisd-new at hub.org X-Spam-Status: No, hits=0.0 tagged_above=0.0 required=5.0 tests= X-Spam-Level: X-Archive-Number: 200408/90 X-Sequence-Number: 7726 On Fri, Aug 06, 2004 at 07:28:38PM -0500, sandra ruiz wrote: > in the docummentation about the planer it says: > > "It first combines all possible ways of scanning and joining the relations > that appear in a query" > > I would like to know if there's a time limit to do that or if it just scans > ALL the posibilities until it finishes..no matter the time it takes.. Depends; if you join a lot of tables, it stops doing an exhaustive search and goes for genetic optimization instead: http://www.postgresql.org/docs/7.4/static/geqo.html /* Steinar */ -- Homepage: http://www.sesse.net/