X-Original-To: pgsql-performance-postgresql.org@localhost.postgresql.org Received: from localhost (unknown [200.46.204.144]) by svr1.postgresql.org (Postfix) with ESMTP id 8E61856584 for ; Wed, 9 Mar 2005 17:41:20 +0000 (GMT) Received: from svr1.postgresql.org ([200.46.204.71]) by localhost (av.hub.org [200.46.204.144]) (amavisd-new, port 10024) with ESMTP id 90911-05 for ; Wed, 9 Mar 2005 17:41:18 +0000 (GMT) Received: from ra.sai.msu.su (ra.sai.msu.su [158.250.29.2]) by svr1.postgresql.org (Postfix) with ESMTP id 9038856454 for ; Wed, 9 Mar 2005 17:41:10 +0000 (GMT) Received: from ra (ra [158.250.29.2]) by ra.sai.msu.su (8.12.10/8.12.10) with ESMTP id j29Hf15Q013277; Wed, 9 Mar 2005 20:41:01 +0300 (MSK) Date: Wed, 9 Mar 2005 20:41:01 +0300 (MSK) From: Oleg Bartunov X-X-Sender: megera@ra.sai.msu.su To: Werner Bohl Cc: pgsql-performance@postgresql.org Subject: Re: How to speed up tsearch2 indexing In-Reply-To: <1110389147.21620.6.camel@sirio> Message-ID: References: <1110389147.21620.6.camel@sirio> 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, hits=0.35 tagged_above=0 required=5 tests=AWL, DNS_FROM_RFC_ABUSE X-Spam-Level: X-Archive-Number: 200503/170 X-Sequence-Number: 10875 On Wed, 9 Mar 2005, Werner Bohl wrote: > All, > > I have a table with ~ 3 million records. I'm indexing a field holding > names, no more than 200 bytes each. Indexing the resulting tsvector > takes forever. It's been running now for more than 40 hours on a Linux > with PG 8.01, a single Xeon & 4GB RAM. My work_mem postgresql.conf > parameter is at 240960 and maintenance_work_mem at 96384, although the > index task is using at most 12MB. Task is 99% cpu bound. Is there any > way I may speed up the indexing? What's your tsearch2 configuration ? Do you use dictionaries ? I wrote a brief explanation of tsearch2 internals http://www.sai.msu.su/~megera/oddmuse/index.cgi/Tsearch_V2_internals Hope, it could help you. > > > TIA, > > > Regards, Oleg _____________________________________________________________ Oleg Bartunov, sci.researcher, hostmaster of AstroNet, Sternberg Astronomical Institute, Moscow University (Russia) Internet: oleg@sai.msu.su, http://www.sai.msu.su/~megera/ phone: +007(095)939-16-83, +007(095)939-23-83