Re: plan time of MASSIVE partitioning ...

Tom Lane <tgl@sss.pgh.pa.us>

From: Tom Lane <tgl@sss.pgh.pa.us>
To: Boszormenyi Zoltan <zb@cybertec.at>
Cc: Alvaro Herrera <alvherre@commandprompt.com>, Stephen Frost <sfrost@snowman.net>, Hans-Jürgen Schönig <postgres@cybertec.at>, Robert Haas <robertmhaas@gmail.com>, pgsql-hackers Hackers <pgsql-hackers@postgresql.org>
Date: 2010-09-08T17:19:38Z
Lists: pgsql-hackers
Boszormenyi Zoltan <zb@cybertec.at> writes:
> Tom Lane rta:
>> AFAIR, canonical pathkeys are the *only* thing in the planner where pure
>> pointer equality is interesting.  So I doubt this hack is of any use for
>> EquivalenceClass, even if the lists were likely to be long which they
>> aren't.

> No, for EquivalanceClass->ec_member, I need to do something
> funnier, like implement compare(Node *, Node *) and use that
> instead of equal(Node *, Node *)... Something like nodeToString()
> on both Node * and strcmp() the resulting strings.

Well, (a) that doesn't work (hint: there are fields in nodes that are
intentionally ignored by equal()), and (b) I still don't believe that
there's an actual bottleneck there.  ECs generally aren't very big.

			regards, tom lane