pg.ddx.io pgsql-sql@postgresql.org mailing list archive
help / color / mirror / Atom feedFrom: rawi <only4com@web.de>
To: pgsql-sql@postgresql.org
Subject: Re: Index Usage and Running Times by FullTextSearch with prefix matching
Date: Thu, 13 Jun 2013 08:39:26 -0700 (PDT)
Message-ID: <1371137966540-5759046.post@n5.nabble.com> (raw)
In-Reply-To: <22495.1371135398@sss.pgh.pa.us>
References: <1371123556877-5759021.post@n5.nabble.com>
<22495.1371135398@sss.pgh.pa.us>
List-Unsubscribe: <mailto:majordomo@postgresql.org?body=unsub%20pgsql-sql>
Tom Lane-2 wrote
> 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).
Short or long prefixes seem to be equaly unfavorable. Even with the full
length of the words, but queried as prefix I get a runtime of 25342ms
compared to 353ms without prefixes:
SELECT count(a)
FROM t1
WHERE a_tsvector @@ to_tsquery('aaaaa:* & bbbbb:* & ccccc:* & ddddd:*')
Total query runtime: 25342 ms
"Aggregate (cost=804.02..804.03 rows=1 width=36)"
" -> Bitmap Heap Scan on t1 (cost=800.00..804.02 rows=1 width=36)"
" Recheck Cond: (a_tsvector @@ to_tsquery('aaaaa:* & bbbbb:* &
ccccc:* & ddddd:*'::text))"
" -> Bitmap Index Scan on a_tsvector_idx (cost=0.00..800.00 rows=1
width=0)"
" Index Cond: (a_tsvector @@ to_tsquery('aaaaa:* & bbbbb:* &
ccccc:* & ddddd:*'::text))"
Kind Regards
Rawi
--
View this message in context: http://postgresql.1045698.n5.nabble.com/Index-Usage-and-Running-Times-by-FullTextSearch-with-prefix-...
Sent from the PostgreSQL - sql mailing list archive at Nabble.com.
--
Sent via pgsql-sql mailing list (pgsql-sql@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-sql
view thread (6+ messages) latest in thread
Message-ID: <1371137966540-5759046.post@n5.nabble.com>
Permalink: ../1371137966540-5759046.post@n5.nabble.com/
Also on: postgresql.org/message-id/1371137966540-5759046.post@n5.nabble.com
reply
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Reply to all the recipients using the --to and --cc options:
reply via email
To: pgsql-sql@postgresql.org
Cc: only4com@web.de
Subject: Re: Index Usage and Running Times by FullTextSearch with prefix matching
In-Reply-To: <1371137966540-5759046.post@n5.nabble.com>
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox