X-Original-To: pgsql-performance-postgresql.org@localhost.postgresql.org Received: from localhost (av.hub.org [200.46.204.144]) by postgresql.org (Postfix) with ESMTP id 914CA9DCBB4 for ; Fri, 20 Jan 2006 20:36:43 -0400 (AST) Received: from postgresql.org ([200.46.204.71]) by localhost (av.hub.org [200.46.204.144]) (amavisd-new, port 10024) with ESMTP id 19008-03 for ; Fri, 20 Jan 2006 20:36:44 -0400 (AST) X-Greylist: from auto-whitelisted by SQLgrey- Received: from cassarossa.samfundet.no (cassarossa.samfundet.no [129.241.93.19]) by postgresql.org (Postfix) with ESMTP id D24669DCABE for ; Fri, 20 Jan 2006 20:36:39 -0400 (AST) Received: from trofast.sesse.net ([129.241.93.32]) by cassarossa.samfundet.no with esmtp (Exim 4.50) id 1F06kD-0004T0-K0; Sat, 21 Jan 2006 01:36:41 +0100 Received: from sesse by trofast.sesse.net with local (Exim 3.36 #1 (Debian)) id 1F06kI-0008BL-00; Sat, 21 Jan 2006 01:36:46 +0100 Date: Sat, 21 Jan 2006 01:36:46 +0100 From: "Steinar H. Gunderson" To: Tom Lane Cc: pgsql-performance@postgresql.org, Teodor Sigaev , Oleg Bartunov Subject: Re: [GENERAL] Creation of tsearch2 index is very slow Message-ID: <20060121003646.GA31406@uio.no> Mail-Followup-To: Tom Lane , pgsql-performance@postgresql.org, Teodor Sigaev , Oleg Bartunov References: <26583.1137788505@sss.pgh.pa.us> <20060120205132.GF31908@svana.org> <26958.1137791955@sss.pgh.pa.us> <20060120213754.GG31908@svana.org> <7.0.1.0.2.20060120174141.039b03e8@earthlink.net> <6111.1137797436@sss.pgh.pa.us> <20060120225751.GA27230@uio.no> <6532.1137801157@sss.pgh.pa.us> <20060121000519.GA29755@uio.no> <6743.1137802990@sss.pgh.pa.us> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline In-Reply-To: <6743.1137802990@sss.pgh.pa.us> X-Operating-System: Linux 2.6.14.3 on a x86_64 X-Message-Flag: Outlook? --> http://www.mozilla.org/products/thunderbird/ User-Agent: Mutt/1.5.11 X-Virus-Scanned: by amavisd-new at hub.org X-Spam-Status: No, score=0.068 required=5 tests=[AWL=0.068] X-Spam-Score: 0.068 X-Spam-Level: X-Archive-Number: 200601/382 X-Sequence-Number: 16860 On Fri, Jan 20, 2006 at 07:23:10PM -0500, Tom Lane wrote: > I'm not very clear on what tsearch2 is doing with these bitmaps, but it > looks like an upper page's downlink has the union (bitwise OR) of the > one-bits in the values on the lower page, and you have to visit the lower > page if this union has a nonempty intersection with the set you are looking > for. If that's correct, what you really want is to divide the values so > that the unions of the two sets have minimal overlap ... which seems to me > to have little to do with what the code does at present. Sort of like the vertex-cover problem? That's probably a lot harder than finding the two farthest points... /* Steinar */ -- Homepage: http://www.sesse.net/