"Connors, Bill" <BConnors@xxxxxxxxxxx> writes: > ... in my actual system where we have a couple hundred partitions this > query takes minutes to plan. Please note what the documentation says under "Partitioning Caveats". The current partitioning support is not meant to scale past a few dozen partitions. So the solution to your problem is to not have so many partitions. There are plans to make some fundamental changes in partitioning support, and one of the main reasons for that is to allow it to scale to larger numbers of partitions. This is just in the arm-waving stage though ... regards, tom lane -- Sent via pgsql-performance mailing list (pgsql-performance@xxxxxxxxxxxxxx) To make changes to your subscription: http://www.postgresql.org/mailpref/pgsql-performance