Received: from maia.hub.org (maia-2.hub.org [200.46.204.251]) by mail.postgresql.org (Postfix) with ESMTP id 33105B5DE2C for ; Mon, 6 Jun 2011 07:52:00 -0300 (ADT) Received: from mail.postgresql.org ([200.46.204.86]) by maia.hub.org (mx1.hub.org [200.46.204.251]) (amavisd-maia, port 10024) with ESMTP id 09339-04 for ; Mon, 6 Jun 2011 10:51:52 +0000 (UTC) X-Greylist: from auto-whitelisted by SQLgrey-1.7.6 Received: from exprod7og121.obsmtp.com (exprod7og121.obsmtp.com [64.18.2.20]) by mail.postgresql.org (Postfix) with ESMTP id B6FB1B5DD8E for ; Mon, 6 Jun 2011 07:51:51 -0300 (ADT) Received: from mail-ey0-f177.google.com ([209.85.215.177]) (using TLSv1) by exprod7ob121.postini.com ([64.18.6.12]) with SMTP ID DSNKTeyxR1E/c23LBnOtlcfBS+vGm2e58J5j@postini.com; Mon, 06 Jun 2011 03:51:52 PDT Received: by eyh6 with SMTP id 6so1583673eyh.8 for ; Mon, 06 Jun 2011 03:51:49 -0700 (PDT) Received: by 10.14.100.194 with SMTP id z42mr187121eef.108.1307357509738; Mon, 06 Jun 2011 03:51:49 -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 a45sm3089721eec.23.2011.06.06.03.51.47 (version=TLSv1/SSLv3 cipher=OTHER); Mon, 06 Jun 2011 03:51:48 -0700 (PDT) Message-ID: <4DECB141.2040707@enterprisedb.com> Date: Mon, 06 Jun 2011 13:51:45 +0300 From: Heikki Linnakangas User-Agent: Mozilla/5.0 (X11; U; Linux x86_64; fi-FI; rv:1.9.2.17) Gecko/20110510 Icedove/3.1.10 MIME-Version: 1.0 To: Alexander Korotkov CC: pgsql-hackers Subject: Re: WIP: Fast GiST index build References: <4DEC84D7.7040602@enterprisedb.com> In-Reply-To: <4DEC84D7.7040602@enterprisedb.com> 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: 201106/390 X-Sequence-Number: 189103 On 06.06.2011 10:42, Heikki Linnakangas wrote: > On 03.06.2011 14:02, Alexander Korotkov wrote: >> Hackers, >> >> WIP patch of fast GiST index build is attached. Code is dirty and >> comments >> are lacking, but it works. Now it is ready for first benchmarks, which >> should prove efficiency of selected technique. It's time to compare fast >> GiST index build with repeat insert build on large enough datasets >> (datasets >> which don't fit to cache). There are following aims of testing: >> 1) Measure acceleration of index build. >> 2) Measure change in index quality. >> I'm going to do first testing using synthetic datasets. Everybody who >> have >> interesting real-life datasets for testing are welcome. > > I ran another test with a simple table generated with: > > CREATE TABLE pointtest (p point); > INSERT INTO pointtest SELECT point(random(), random()) FROM > generate_series(1,50000000); > > Generating a gist index with: > > CREATE INDEX i_pointtest ON pointtest USING gist (p); > > took about 15 hours without the patch, and 2 hours with it. That's quite > dramatic. Oops, that was a rounding error, sorry. The run took about 2.7 hours with the patch, which of course should be rounded to 3 hours, not 2. Anyway, it is still a very impressive improvement. I'm glad you could get the patch ready for benchmarking this quickly. Now you just need to get the patch into shape so that it can be committed. That is always the more time-consuming part, so I'm glad you have plenty of time left for it. Could you please create a TODO list on the wiki page, listing all the missing features, known bugs etc. that will need to be fixed? That'll make it easier to see how much work there is left. It'll also help anyone looking at the patch to know which issues are known issues. Meanwhile, it would still be very valuable if others could test this with different workloads. And Alexander, it would be good if at some point you could write some benchmark scripts too, and put them on the wiki page, just to see what kind of workloads have been taken into consideration and tested already. Do you think there's some worst-case data distributions where this algorithm would perform particularly badly? -- Heikki Linnakangas EnterpriseDB http://www.enterprisedb.com