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 A2A0056503 for ; Wed, 9 Mar 2005 17:25:29 +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 86130-04 for ; Wed, 9 Mar 2005 17:25:20 +0000 (GMT) Received: from omr4.netsolmail.com (omr4.netsolmail.com [216.168.230.140]) by svr1.postgresql.org (Postfix) with ESMTP id 35F06564AB for ; Wed, 9 Mar 2005 17:25:15 +0000 (GMT) Received: from ms9.netsolmail.com (IDENT:mirapoint@[216.168.230.183]) by omr4.netsolmail.com (8.12.10/8.12.10) with ESMTP id j29HPDqp004997 for ; Wed, 9 Mar 2005 12:25:15 -0500 (EST) Received: from 192.168.2.2 ([200.12.239.103]) by ms9.netsolmail.com (Mirapoint Messaging Server MOS 3.2.2-GA) with ESMTP id CSV39072; Wed, 9 Mar 2005 12:25:10 -0500 (EST) Subject: How to speed up tsearch2 indexing From: Werner Bohl Reply-To: WernerBohl@infutor.com To: pgsql-performance@postgresql.org Content-Type: text/plain Organization: IDS de Costa Rica S.A. Date: Wed, 09 Mar 2005 11:25:47 -0600 Message-Id: <1110389147.21620.6.camel@sirio> Mime-Version: 1.0 X-Mailer: Evolution 2.0.2 (2.0.2-3) Content-Transfer-Encoding: 7bit X-Virus-Scanned: by amavisd-new at hub.org X-Spam-Status: No, hits=0 tagged_above=0 required=5 tests= X-Spam-Level: X-Archive-Number: 200503/169 X-Sequence-Number: 10874 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? TIA, -- Werner Bohl IDS de Costa Rica S.A.