> Looking at eqjoinsel I think it could be improved algorithmically if we keep
> the mcv list in sorted order, even if it's just binary sorted order. But I'm
> not sure what else uses those values and whether the current ordering is
> significant. I'm also not sure it's the only O(n^2) algorithm there and
> there's no algorithmic gain unless they're all knocked down.

The current code seems to be trying to handle pathological cases where:

(1) the operator for which it is invoked doesn't really represent
equality and/or
(2) the type has an equality operator but no comparison operator.

Those are important cases, but maybe we could create an alternative
version for the fairly common situation where neither holds?

...Robert

-- 
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