On 16/07/10 05:22, Howard Rogers wrote:
OK, Tom: I did actually account for the number of rows difference before I posted, though I accept I didn't show you that. So here goes:
Tom's good, but his mind-reading powers aren't what they used to be :-)
ims=# select count(*) ims-# from search_rm ims-# where to_tsvector('english', textsearch) @@ to_tsquery('english', 'wommmman& batt& ftxa') ims-# limit 20; count ------- 0 (1 row) Time: 0.593 ms ims=# select count(*) from search_rm where to_tsvector('english', textsearch) @@ to_tsquery('english', 'wommmman& batt& ftx1') limit 20; count ------- 0 (1 row) Time: 489.362 ms Both queries return zero rows. One takes an awful lot longer than the other.
And how many matches do you get for each term? Is it equally slow if you search for 'wommman & batt && pzsdja' vs '... pzsdj1'?
I'm assuming pzsdja/1 aren't valid tokens of course... -- Richard Huxton Archonet Ltd -- Sent via pgsql-general mailing list (pgsql-general@xxxxxxxxxxxxxx) To make changes to your subscription: http://www.postgresql.org/mailpref/pgsql-general