Received: from localhost (unknown [200.46.204.183]) by developer.postgresql.org (Postfix) with ESMTP id 3DF382E0030 for ; Fri, 23 May 2008 06:01:24 -0300 (ADT) Received: from developer.postgresql.org ([200.46.204.71]) by localhost (mx1.hub.org [200.46.204.183]) (amavisd-maia, port 10024) with ESMTP id 27376-08 for ; Fri, 23 May 2008 06:01:17 -0300 (ADT) X-Greylist: from auto-whitelisted by SQLgrey-1.7.6 Received: from dc.baikal.ru (dc.baikal.ru [212.176.3.237]) by developer.postgresql.org (Postfix) with ESMTP id BAB722E002D for ; Fri, 23 May 2008 06:01:19 -0300 (ADT) Received: from it319k5.dc-local (it319k5.dc-local [10.0.4.75]) (authenticated bits=0) by dc.baikal.ru (8.13.8/8.13.8) with ESMTP id m4N91FrH016643 for ; Fri, 23 May 2008 18:01:15 +0900 Message-ID: <483687DC.5030300@dc.baikal.ru> Date: Fri, 23 May 2008 18:01:16 +0900 From: Vlad Arkhipov User-Agent: Thunderbird 2.0.0.0 (X11/20070326) MIME-Version: 1.0 To: pgsql-performance@postgresql.org Subject: join/from_collapse_limit and geqo_threshold default values Content-Type: multipart/alternative; boundary="------------040504040305050205020504" X-Virus-Scanned: ClamAV version 0.93, clamav-milter version 0.93 on dc.baikal.ru X-Virus-Status: Clean X-Virus-Scanned: Maia Mailguard 1.0.1 X-Spam-Status: No, hits=0.001 tagged_above=0 required=5 tests=AWL=-0.000, HTML_MESSAGE=0.001 X-Spam-Level: X-Archive-Number: 200805/313 X-Sequence-Number: 30281 This is a multi-part message in MIME format. --------------040504040305050205020504 Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit I wonder why join_collapse_limit default values is set to 8 but geqo_threshold is 12. Optimizer doesn't change the order of JOIN's of queries that contains from 8 to 11 tables. Why it's 'wise' decision as documentation says? from_collapse_limit (integer) The planner will merge sub-queries into upper queries if the resulting FROM list would have no more than this many items. Smaller values reduce planning time but might yield inferior query plans. The default is eight. It is usually wise to keep this less than geqo_threshold . For more information see Section 14.3 . --------------040504040305050205020504 Content-Type: text/html; charset=UTF-8 Content-Transfer-Encoding: 7bit I wonder why join_collapse_limit default values is set to 8 but geqo_threshold is 12. Optimizer doesn't change the order of JOIN's of queries that contains from 8 to 11 tables. Why it's 'wise' decision as documentation says?
from_collapse_limit (integer)

The planner will merge sub-queries into upper queries if the resulting FROM list would have no more than this many items. Smaller values reduce planning time but might yield inferior query plans. The default is eight. It is usually wise to keep this less than geqo_threshold. For more information see Section 14.3.

--------------040504040305050205020504--