Tom Lane wrote: > Jesper Krogh <jesper@xxxxxxxx> writes: >> Is is possible to manually set the cost for the @@ operator? > > You want to set the cost for the underlying function. alter function ts_match_vq(tsvector,tsquery) cost 500 seems to change my test-queries in a very positive way (e.g. resolve to bitmap index scan on most queryies but fall onto index-scans on alternative columns when queriterms are common enough). According to the documentation the default cost is 1 for builin functions and 100 for others, is this true for the ts-stuff also? Can I query the database for the cost of the functions? It somehow seems natural that comparing a 1,3 term tsquery to a 200+ term tsvector is orders of magitude more expensive than simple operations. I somehow suspect that this is a bad thing to do if I have other gin-indexes where the tsvector is much smaller in the same database. But then I can just use ts_match_qv for those queries or add my own which justy raises the cost. Thanks. -- Jesper -- Sent via pgsql-performance mailing list (pgsql-performance@xxxxxxxxxxxxxx) To make changes to your subscription: http://www.postgresql.org/mailpref/pgsql-performance