Re: Index Usage and Running Times by FullTextSearch with prefix matching - Mailing list pgsql-sql

From rawi
Subject Re: Index Usage and Running Times by FullTextSearch with prefix matching
Date
Msg-id 1371137966540-5759046.post@n5.nabble.com
Whole thread Raw
In response to Re: Index Usage and Running Times by FullTextSearch with prefix matching  (Tom Lane <tgl@sss.pgh.pa.us>)
List pgsql-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-matching-tp5759021p5759046.html
Sent from the PostgreSQL - sql mailing list archive at Nabble.com.



pgsql-sql by date:

Previous
From: rawi
Date:
Subject: Re: Index Usage and Running Times by FullTextSearch with prefix matching
Next
From: JORGE MALDONADO
Date:
Subject: Select clause in JOIN statement