Re: plan time of MASSIVE partitioning ...

Hans-Jürgen Schönig <postgres@cybertec.at>

From: Hans-Jürgen Schönig <postgres@cybertec.at>
To: Stephen Frost <sfrost@snowman.net>
Cc: Robert Haas <robertmhaas@gmail.com>, Boszormenyi Zoltan <zb@cybertec.at>, pgsql-hackers Hackers <pgsql-hackers@postgresql.org>
Date: 2010-09-08T14:26:43Z
Lists: pgsql-hackers

Attachments

here is the patch again.
we accidentally attached a wrong test file to the original posting so it grew to big. we had to revoke it from the moderator (this happens if you code from 8am to 10pm).
here is just the patch - it is nice and small.

you can easily test it by making yourself a nice parent table, many subtables (hundreds or thousands) and a decent number of indexes per partition.
then run PREPARE with \timing to see what happens.
you should get scary planning times. the more potential indexes and tables the more scary it will be.

using this wonderful RB tree the time for this function call goes down to basically zero.
i hope this is something which is useful to some folks out there.

	many thanks,

		hans