Received: from maia.hub.org (maia-3.hub.org [200.46.204.243]) by mail.postgresql.org (Postfix) with ESMTP id 7AE83B5D8C5 for ; Thu, 11 Aug 2011 03:21:34 -0300 (ADT) Received: from mail.postgresql.org ([200.46.204.86]) by maia.hub.org (mx1.hub.org [200.46.204.243]) (amavisd-maia, port 10024) with ESMTP id 69283-03 for ; Thu, 11 Aug 2011 06:21:28 +0000 (UTC) X-Greylist: domain auto-whitelisted by SQLgrey-1.7.6 Received: from exprod7og125.obsmtp.com (exprod7og125.obsmtp.com [64.18.2.28]) by mail.postgresql.org (Postfix) with ESMTP id 85AC1B5D80A for ; Thu, 11 Aug 2011 03:21:27 -0300 (ADT) Received: from mail-fx0-f54.google.com ([209.85.161.54]) (using TLSv1) by exprod7ob125.postini.com ([64.18.6.12]) with SMTP ID DSNKTkN05rqWkU7NJUTqqsUIBxhlASC8EoL7@postini.com; Wed, 10 Aug 2011 23:21:28 PDT Received: by fxe4 with SMTP id 4so1947719fxe.13 for ; Wed, 10 Aug 2011 23:21:25 -0700 (PDT) Received: by 10.223.1.135 with SMTP id 7mr4675832faf.46.1313043685105; Wed, 10 Aug 2011 23:21:25 -0700 (PDT) Received: from [192.168.1.183] (dsl-hkibrasgw2-ff7ac300-240.dhcp.inet.fi [88.195.122.240]) by mx.google.com with ESMTPS id c5sm343349fah.6.2011.08.10.23.21.23 (version=TLSv1/SSLv3 cipher=OTHER); Wed, 10 Aug 2011 23:21:23 -0700 (PDT) Message-ID: <4E4374DD.3000003@enterprisedb.com> Date: Thu, 11 Aug 2011 09:21:17 +0300 From: Heikki Linnakangas User-Agent: Mozilla/5.0 (X11; U; Linux x86_64; fi-FI; rv:1.9.2.18) Gecko/20110626 Icedove/3.1.11 MIME-Version: 1.0 To: Alexander Korotkov CC: pgsql-hackers Subject: Re: WIP: Fast GiST index build References: <4E2DBB60.80604@enterprisedb.com> <4E2EF83A.8000304@enterprisedb.com> <4E31D03D.70206@enterprisedb.com> <4E3977D8.1020506@enterprisedb.com> <4E3FAB1D.1060105@enterprisedb.com> In-Reply-To: Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit X-Virus-Scanned: Maia Mailguard 1.0.1 X-Spam-Status: No, hits=-1.9 tagged_above=-5 required=5 tests=BAYES_00=-1.9 X-Spam-Level: X-Archive-Number: 201108/509 X-Sequence-Number: 193264 Split of an internal node works like this: 1. Gather all the existing tuples on the page, plus the new tuple being inserted. 2. Call picksplit on the tuples, to divide them into pages 3. Go through all tuples on the buffer associated with the page, and divide them into buffers on the new pages. This is done by calling penalty function on each buffered tuple. I wonder if it would be better for index quality to pass the buffered tuples to picksplit in the 2nd step, so that they too can affect the split decision. Maybe it doesn't make much difference in practice.. -- Heikki Linnakangas EnterpriseDB http://www.enterprisedb.com