Received: from maia.hub.org (maia-3.hub.org [200.46.204.243]) by mail.postgresql.org (Postfix) with ESMTP id 46F9BB5DC49 for ; Thu, 11 Aug 2011 07:29:11 -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 26448-04 for ; Thu, 11 Aug 2011 10:29:04 +0000 (UTC) X-Greylist: domain auto-whitelisted by SQLgrey-1.7.6 Received: from exprod7og106.obsmtp.com (exprod7og106.obsmtp.com [64.18.2.165]) by mail.postgresql.org (Postfix) with ESMTP id F2649B5DBD6 for ; Thu, 11 Aug 2011 07:29:03 -0300 (ADT) Received: from mail-fx0-f42.google.com ([209.85.161.42]) (using TLSv1) by exprod7ob106.postini.com ([64.18.6.12]) with SMTP ID DSNKTkOu761CTIHUHJcH9DULlV75Xce5QpdD@postini.com; Thu, 11 Aug 2011 03:29:04 PDT Received: by fxe23 with SMTP id 23so3610227fxe.1 for ; Thu, 11 Aug 2011 03:29:02 -0700 (PDT) Received: by 10.223.102.68 with SMTP id f4mr362343fao.117.1313058541873; Thu, 11 Aug 2011 03:29:01 -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 o18sm1454063fal.23.2011.08.11.03.29.00 (version=TLSv1/SSLv3 cipher=OTHER); Thu, 11 Aug 2011 03:29:00 -0700 (PDT) Message-ID: <4E43AEEA.2040105@enterprisedb.com> Date: Thu, 11 Aug 2011 13:28:58 +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/519 X-Sequence-Number: 193274 On 10.08.2011 22:44, Alexander Korotkov wrote: > Manual and readme updates. Thanks, I'm reviewing these now. Do we want to expose the level-step and buffersize parameters to users? They've been useful during testing, but I'm thinking we should be able to guess good enough values for them automatically, and just remove the options. It's pretty much impossible for a user to tune them correctly, it would require deep knowledge of the buffering algorithm. I'm thinking that even when you explicitly turn buffering on, we should still process the first 10000 or so tuples with simple inserts. That way we always have a sample of tuples to calculate the average tuple size from. It's plausible that if the input data is ordered, looking at the first N tuples will give skewed sample, but I don't think there's much danger of that in practice. Even if the data is ordered, the length of GiST tuples shouldn't vary much. What happens if we get the levelstep and pagesPerBuffer estimates wrong? How sensitive is the algorithm to that? Or will we run out of memory? Would it be feasible to adjust those in the middle of the index build, if we e.g exceed the estimated memory usage greatly? -- Heikki Linnakangas EnterpriseDB http://www.enterprisedb.com