X-Original-To: pgsql-general-postgresql.org@localhost.postgresql.org Received: from localhost (av.hub.org [200.46.204.144]) by postgresql.org (Postfix) with ESMTP id 71FE79DCAC9 for ; Fri, 20 Jan 2006 10:07:40 -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 77414-03 for ; Fri, 20 Jan 2006 10:07:43 -0400 (AST) X-Greylist: delayed 00:06:39.443804 by SQLgrey- Received: from mail.gmx.net (mail.gmx.net [213.165.64.21]) by postgresql.org (Postfix) with SMTP id 222849DCAC3 for ; Fri, 20 Jan 2006 10:07:36 -0400 (AST) Received: (qmail invoked by alias); 20 Jan 2006 14:01:00 -0000 Received: from p54A65321.dip.t-dialin.net (EHLO athlon64) [84.166.83.33] by mail.gmx.net (mp039) with SMTP; 20 Jan 2006 15:01:00 +0100 X-Authenticated: #594052 Received: from localhost (HELO [127.0.0.1]) [127.0.0.1] by athlon64 (192.168.0.2) (userid 3) with ESMTP (Classic Hamster Version 2.1 Build 2.1.0.0) ; Fri, 20 Jan 2006 15:02:03 +0100 Message-ID: <43D0ED57.1020608@gmx.de> Date: Fri, 20 Jan 2006 15:01:59 +0100 From: Stephan Vollmer User-Agent: Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.8) Gecko/20051201 Thunderbird/1.5 Mnenhy/0.7.3.0 MIME-Version: 1.0 To: pgsql-general@postgresql.org Subject: Creation of tsearch2 index is very slow X-Enigmail-Version: 0.94.0.0 OpenPGP: id=8D46FCF8 Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="------------enig0E17953E05D89B8D3538EB92" X-Posting-Agent: Hamster/2.1.0.0 X-Y-GMX-Trusted: 0 X-Virus-Scanned: by amavisd-new at hub.org X-Spam-Status: No, score=0 required=5 tests=[none] X-Spam-Score: 0 X-Spam-Level: X-Archive-Number: 200601/990 X-Sequence-Number: 89935 This is an OpenPGP/MIME signed message (RFC 2440 and 3156) --------------enig0E17953E05D89B8D3538EB92 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable Hello! I noticed that the creation of a GIST index for tsearch2 takes very long - about 20 minutes. CPU utilization is 100 %, the resulting index file size is ~25 MB. Is this behaviour normal? Full text columns: title author_list tsearch2 word lists: fti_title fti_author_list tsearch2 indexes: idx_fti_title idx_fti_author_list The table has 700,000 records. When I create a normal B-Tree index on the same column for testing purposes, it works quite fast (approx. 30 seconds). The columns that should be indexed are small, only about 10 words on average. System specs: Athlon64 X2 3800+, 2 GB RAM PostgreSQL 8.1.2, Windows XP SP2 I've never noticed this problem before, so could it probably be related to v8.1.2? Or is something in my configuration or table definition that causes this sluggishness? Thanks very much in advance for your help! - Stephan This is the table definition: ----------------------------------------------------------------- CREATE TABLE publications ( id int4 NOT NULL DEFAULT nextval('publications_id_seq'::regclass), publication_type_id int4 NOT NULL DEFAULT 0, keyword text NOT NULL, mdate date, "year" date, title text, fti_title tsvector, author_list text, fti_author_list tsvector, overview_timestamp timestamp, overview_xml text, CONSTRAINT publications_pkey PRIMARY KEY (keyword) USING INDEX TABLESPACE dblp_index, CONSTRAINT publications_publication_type_id_fkey FOREIGN KEY (publication_type_id) REFERENCES publication_types (id) MATCH SIMPLE ON UPDATE RESTRICT ON DELETE RESTRICT, CONSTRAINT publications_year_check CHECK (date_part('month'::text, "year") =3D 1::double precision AND date_part('day'::text, "year") =3D 1::double precision) ) WITHOUT OIDS; CREATE INDEX fki_publications_publication_type_id ON publications USING btree (publication_type_id) TABLESPACE dblp_index; CREATE INDEX idx_fti_author_list ON publications USING gist (fti_author_list) TABLESPACE dblp_index; CREATE INDEX idx_fti_title ON publications USING gist (fti_title) TABLESPACE dblp_index; CREATE INDEX idx_publications_year ON publications USING btree ("year") TABLESPACE dblp_index; CREATE INDEX idx_publications_year_part ON publications USING btree (date_part('year'::text, "year")) TABLESPACE dblp_index; CREATE TRIGGER tsvectorupdate_all BEFORE INSERT OR UPDATE ON publications FOR EACH ROW EXECUTE PROCEDURE multi_tsearch2(); --------------enig0E17953E05D89B8D3538EB92 Content-Type: application/pgp-signature; name="signature.asc" Content-Description: OpenPGP digital signature Content-Disposition: attachment; filename="signature.asc" -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.2 (MingW32) Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org iD8DBQFD0O1ajY05go1G/PgRAp3FAKCOFlbFXBab4fmdQGIE+4ZjMLMyeQCeMRBU GFeoqOaMjn5QmaHpNfYfyfs= =9rDq -----END PGP SIGNATURE----- --------------enig0E17953E05D89B8D3538EB92--