Received: from localhost (unknown [200.46.204.183]) by developer.postgresql.org (Postfix) with ESMTP id D0CAC2E0088 for ; Fri, 6 Jun 2008 11:02:32 -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 46134-02 for ; Fri, 6 Jun 2008 11:02:24 -0300 (ADT) X-Greylist: domain auto-whitelisted by SQLgrey-1.7.6 Received: from mail01.enterprisedb.com (mail01.enterprisedb.com [63.246.7.168]) by developer.postgresql.org (Postfix) with ESMTP id B4E602E008A for ; Fri, 6 Jun 2008 11:02:29 -0300 (ADT) thread-index: AcjH3g7teYtVb2ooQkatPqapDV+2OQ== Received: from [88.195.99.30] ([88.195.99.30]) by mail01.enterprisedb.com over TLS secured channel with Microsoft SMTPSVC(6.0.3790.3959); Fri, 6 Jun 2008 10:03:11 -0400 Content-Class: urn:content-classes:message Importance: normal X-MimeOLE: Produced By Microsoft MimeOLE V6.00.3790.4133 Message-ID: <4849436F.30703@enterprisedb.com> Date: Fri, 06 Jun 2008 17:02:23 +0300 From: "Heikki Linnakangas" Organization: EnterpriseDB User-Agent: Mozilla-Thunderbird 2.0.0.14 (X11/20080509) MIME-Version: 1.0 To: "Teodor Sigaev" Cc: "Patches" Subject: Re: GIN improvements References: <483FD205.4090904@sigaev.ru> <4849418C.6080909@sigaev.ru> In-Reply-To: <4849418C.6080909@sigaev.ru> Content-Type: text/plain; format=flowed; charset="KOI8-R" Content-Transfer-Encoding: 7bit X-OriginalArrivalTime: 06 Jun 2008 14:03:11.0562 (UTC) FILETIME=[0E3D3AA0:01C8C7DE] X-Virus-Scanned: Maia Mailguard 1.0.1 X-Spam-Status: No, hits=0 tagged_above=0 required=5 tests=none X-Spam-Level: X-Archive-Number: 200806/42 X-Sequence-Number: 6528 Teodor Sigaev wrote: > >> 2) fast insert into GIN > New version: > http://www.sigaev.ru/misc/fast_insert_gin-0.6.gz > > Changes: > - added option FASTUPDATE=(1|t|true|on|enable|0|f|false|disable) for > CREATE/ALTER command for GIN indexes I think we should try to make it automatic. I'm not sure how. How about having a constant sized "fastupdate" buffer, of say 100 rows or a fixed number of pages, and when that becomes full, the next inserter will have to pay the price of updating the index and flushing the buffer. To keep that overhead out of the main codepath, we could make autovacuum to flush the buffers periodically. -- Heikki Linnakangas EnterpriseDB http://www.enterprisedb.com