Received: from localhost (maia-4.hub.org [200.46.204.183]) by postgresql.org (Postfix) with ESMTP id D22989FB5EE for ; Mon, 5 Mar 2007 09:05:15 -0400 (AST) Received: from postgresql.org ([200.46.204.71]) by localhost (mx1.hub.org [200.46.204.183]) (amavisd-new, port 10024) with ESMTP id 18629-08 for ; Mon, 5 Mar 2007 09:05:12 -0400 (AST) X-Greylist: domain auto-whitelisted by SQLgrey-1.7.4 Received: from ciao.gmane.org (main.gmane.org [80.91.229.2]) by postgresql.org (Postfix) with ESMTP id DDAD49FB5A7 for ; Mon, 5 Mar 2007 09:05:11 -0400 (AST) Received: from root by ciao.gmane.org with local (Exim 4.43) id 1HOCsA-0006i2-3L for pgsql-performance@postgresql.org; Mon, 05 Mar 2007 14:05:02 +0100 Received: from 83.239.13.62 ([83.239.13.62]) by main.gmane.org with esmtp (Gmexim 0.1 (Debian)) id 1AlnuQ-0007hv-00 for ; Mon, 05 Mar 2007 14:05:02 +0100 Received: from abaidulin by 83.239.13.62 with local (Gmexim 0.1 (Debian)) id 1AlnuQ-0007hv-00 for ; Mon, 05 Mar 2007 14:05:02 +0100 X-Injected-Via-Gmane: http://gmane.org/ To: pgsql-performance@postgresql.org From: Ares Subject: Re: Having performance problems with TSearch2 Date: Mon, 5 Mar 2007 12:59:59 +0000 (UTC) Lines: 12 Message-ID: References: Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Complaints-To: usenet@sea.gmane.org X-Gmane-NNTP-Posting-Host: main.gmane.org User-Agent: Loom/3.14 (http://gmane.org/) X-Loom-IP: 83.239.13.62 (Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.8.1.2) Gecko/20070220 Firefox/2.0.0.2) X-Virus-Scanned: Maia Mailguard 1.0.1 X-Spam-Status: No, hits=2.409 tagged_above=0 required=5 tests=AWL, BAYES_40, RCVD_IN_BL_SPAMCOP_NET, RCVD_NUMERIC_HELO, SPF_HELO_PASS, SPF_PASS X-Spam-Level: ** X-Archive-Number: 200703/108 X-Sequence-Number: 23513 > > I have problems with queries over tsearch index.I have a table of books, with > 1200000 registers. I have created an GIST index over the title and subtitle, > CREATE INDEX "idxts2_titsub_idx" ON "public"."libros" USING gist ("idxts2_titsub"); Your query didn't use index that you are created.. After CREATE INDEX you mast ran VACUUM (FULL recomended) and REINDEX The query is: select userid,msg,idxfti from _my_msg0 where idxfti @@ to_tsquery('utf8_russian','хочу & трахаться');