Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtp (Exim 4.80) (envelope-from ) id 1Un8xA-0003l1-CD for pgsql-sql@arkaria.postgresql.org; Thu, 13 Jun 2013 14:56:44 +0000 Received: from localhost ([127.0.0.1] helo=postgresql.org) by malur.postgresql.org with smtp (Exim 4.72) (envelope-from ) id 1Un8x9-0004ao-G1 for pgsql-sql@arkaria.postgresql.org; Thu, 13 Jun 2013 14:56:43 +0000 Received: from magus.postgresql.org ([2a02:c0:301:0:ffff::29]) by malur.postgresql.org with esmtp (Exim 4.72) (envelope-from ) id 1Un8x8-0004aR-Hl for pgsql-sql@postgresql.org; Thu, 13 Jun 2013 14:56:42 +0000 Received: from sss.pgh.pa.us ([66.207.139.130]) by magus.postgresql.org with esmtp (Exim 4.80) (envelope-from ) id 1Un8x5-0001oj-Va for pgsql-sql@postgresql.org; Thu, 13 Jun 2013 14:56:42 +0000 Received: from sss2.sss.pgh.pa.us (tgl@localhost [127.0.0.1]) by sss.pgh.pa.us (8.14.5/8.14.5) with ESMTP id r5DEucCV022496; Thu, 13 Jun 2013 10:56:38 -0400 (EDT) From: Tom Lane To: rawi cc: pgsql-sql@postgresql.org Subject: Re: Index Usage and Running Times by FullTextSearch with prefix matching In-reply-to: <1371123556877-5759021.post@n5.nabble.com> References: <1371123556877-5759021.post@n5.nabble.com> Comments: In-reply-to rawi message dated "Thu, 13 Jun 2013 04:39:16 -0700" Date: Thu, 13 Jun 2013 10:56:38 -0400 Message-ID: <22495.1371135398@sss.pgh.pa.us> X-Pg-Spam-Score: -2.3 (--) List-Archive: List-Help: List-ID: List-Owner: List-Post: List-Subscribe: List-Unsubscribe: X-Mailing-List: pgsql-sql Precedence: bulk Sender: pgsql-sql-owner@postgresql.org rawi writes: > And querying: FTS with prefix matching: > SELECT count(a) > FROM t1 > WHERE a_tsvector @@ to_tsquery('aaa:* & b:* & c:* & d:*') > (RESULT: count: 619) > Total query runtime: 21266 ms. FWIW, I get fairly decent performance for cases like this in HEAD (at least with a GIN index; GIST seems much less able to do well with short prefixes). What PG version are you testing? regards, tom lane -- Sent via pgsql-sql mailing list (pgsql-sql@postgresql.org) To make changes to your subscription: http://www.postgresql.org/mailpref/pgsql-sql