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 4165E9DC802 for ; Sat, 21 Jan 2006 09:29:23 -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 63151-09 for ; Sat, 21 Jan 2006 09:29:26 -0400 (AST) X-Greylist: from auto-whitelisted by SQLgrey- Received: from ra.sai.msu.su (ra.sai.msu.su [158.250.29.2]) by postgresql.org (Postfix) with ESMTP id D6C1F9DCC32 for ; Sat, 21 Jan 2006 09:29:12 -0400 (AST) Received: from ra (ra [158.250.29.2]) by ra.sai.msu.su (8.13.4/8.13.4) with ESMTP id k0LDTD3p006224; Sat, 21 Jan 2006 16:29:14 +0300 (MSK) Date: Sat, 21 Jan 2006 16:29:13 +0300 (MSK) From: Oleg Bartunov X-X-Sender: megera@ra.sai.msu.su To: Martijn van Oosterhout cc: Tom Lane , Ron , pgsql-performance@postgresql.org Subject: Re: [GENERAL] Creation of tsearch2 index is very slow In-Reply-To: <20060121130830.GA9955@svana.org> Message-ID: References: <17454.1137771321@sss.pgh.pa.us> <20060120170452.GC31908@svana.org> <26153.1137784469@sss.pgh.pa.us> <20060120201036.GE31908@svana.org> <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> <20060121130830.GA9955@svana.org> MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII; format=flowed X-Virus-Scanned: by amavisd-new at hub.org X-Spam-Status: No, score=0.377 required=5 tests=[AWL=-0.102, DNS_FROM_RFC_ABUSE=0.479] X-Spam-Score: 0.377 X-Spam-Level: X-Archive-Number: 200601/388 X-Sequence-Number: 16866 On Sat, 21 Jan 2006, Martijn van Oosterhout wrote: > However, IMHO, this algorithm is optimising the wrong thing. It > shouldn't be trying to split into sets that are far apart, it should be > trying to split into sets that minimize the number of set bits (ie > distance from zero), since that's what's will speed up searching. Martijn, you're right! We want not only to split page to very different parts, but not to increase the number of sets bits in resulted signatures, which are union (OR'ed) of all signatures in part. We need not only fast index creation (thanks, Tom !), but a better index. Some information is available here http://www.sai.msu.su/~megera/oddmuse/index.cgi/Tsearch_V2_internals There are should be more detailed document, but I don't remember where:) > That's harder though (this algorithm does approximate it sort of) > and I havn't come up with an algorithm yet Don't ask how hard we thought :) Regards, Oleg _____________________________________________________________ Oleg Bartunov, Research Scientist, Head of AstroNet (www.astronet.ru), Sternberg Astronomical Institute, Moscow University, Russia Internet: oleg@sai.msu.su, http://www.sai.msu.su/~megera/ phone: +007(495)939-16-83, +007(495)939-23-83