Received: from maia.hub.org (maia-2.hub.org [200.46.204.251]) by mail.postgresql.org (Postfix) with ESMTP id EA946B889A3 for ; Sat, 4 Jun 2011 12:13:24 -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 25413-06 for ; Sat, 4 Jun 2011 15:13:18 +0000 (UTC) X-Greylist: from auto-whitelisted by SQLgrey-1.7.6 Received: from exprod7og112.obsmtp.com (exprod7og112.obsmtp.com [64.18.2.177]) by mail.postgresql.org (Postfix) with ESMTP id 5EF54B8898F for ; Sat, 4 Jun 2011 12:13:17 -0300 (ADT) Received: from mail-ew0-f47.google.com ([209.85.215.47]) (using TLSv1) by exprod7ob112.postini.com ([64.18.6.12]) with SMTP ID DSNKTepLjNnofIgs8WMRa8QOhVc/RMzH+FOT@postini.com; Sat, 04 Jun 2011 08:13:17 PDT Received: by ewy5 with SMTP id 5so999260ewy.6 for ; Sat, 04 Jun 2011 08:13:15 -0700 (PDT) Received: by 10.14.9.72 with SMTP id 48mr1167998ees.113.1307200393118; Sat, 04 Jun 2011 08:13:13 -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 a41sm1897715eeg.21.2011.06.04.08.13.11 (version=TLSv1/SSLv3 cipher=OTHER); Sat, 04 Jun 2011 08:13:12 -0700 (PDT) Message-ID: <4DEA4B86.9080900@enterprisedb.com> Date: Sat, 04 Jun 2011 18:13:10 +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: 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: 201106/316 X-Sequence-Number: 189029 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 did some quick performance testing of this. I installed postgis 1.5, and loaded an extract of the OpenStreetMap data covering Finland. The biggest gist index in that data set is the idx_nodes_geom index on nodes table. I have maintenance_work_mem and shared_buffers both set to 512 MB, and this laptop has 4GB of RAM. Without the patch, reindexing the index takes about 170 seconds and the index size is 321 MB. And with the patch, it takes about 150 seconds, and the resulting index size is 319 MB. The nodes table is 618MB in size, so it fits in RAM. I presume the gain would be bigger if it doesn't, as the random I/O to update the index starts to hurt more. But this shows that even when it does, this patch helps a little bit, and the resulting index size is comparable. -- Heikki Linnakangas EnterpriseDB http://www.enterprisedb.com