Andy Colson <a...@squeakycode.net> writes:
> No, that's not right, the table was empty.  I rebuilt the table as it 
> was before, here are all three queries again:

Ah, thanks for the more solid data.

>     ->  Bitmap Index Scan on search_key  (cost=0.00..63623.00 rows=1 width=0) 
> (actual time=4.996..4.996 rows=1 loops=1)
>           Index Cond: (search_vec @@ to_tsquery('213 & E & 13 & ST & 
> N:*'::text))

>     ->  Bitmap Index Scan on search_key  (cost=0.00..23.00 rows=1 width=0) 
> (actual time=4.057..4.057 rows=1 loops=1)
>           Index Cond: (search_vec @@ to_tsquery('213 & E & 13 & ST & 
> N'::text))

This says there's only about a 25% runtime penalty for the partial match,
at least on your example, compared to the planner's estimate of 2700x
penalty :-(.  Definitely need to fix that.

                        regards, tom lane


-- 
Sent via pgsql-general mailing list (pgsql-general@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-general

Reply via email to