Simon Riggs <si...@2ndquadrant.com> writes:
> On Sun, 2009-10-18 at 14:50 -0400, Tom Lane wrote:
>> I'd like to suggest boosting the built-in cost estimates for the
>> xxx_has_privilege functions to perhaps 10.  to_tsquery and to_tsvector
>> maybe should be boosted even higher, but I don't have a good specific
>> number in mind.

> ISTM we should set up a test that measures the cost, of those and other
> functions.

Well, some quick testing suggests that 10x is in the right ballpark for
has_table_privilege versus a simple function such as OID equality,
and that even fairly simple cases of to_tsvector/to_tsquery can be
100x the cost of OID equality.  I'm not sure if there is a "typical
case" for the latter given the wide range of possible tsearch
configurations, so trying to benchmark it with any degree of precision
might be pointless.

                        regards, tom lane

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

Reply via email to