the number of child tables --table partitioning

From: Jian Shi <jshi(at)unitrends(dot)com>
To: "pgsql-performance(at)postgresql(dot)org" <pgsql-performance(at)postgresql(dot)org>
Subject: the number of child tables --table partitioning
Date: 2011-09-29 14:14:35
Message-ID: DA4F4F897807834DBADB546A8F635997C6B4@CH1PRD0502MB099.namprd05.prod.outlook.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-performance

Hey,

Is there a suggested number of child tables for table partitioning, I ran a stress test on a master
table (with 800 thousand rows), trying to create 500,000 child tables for it, each child table has 2
indexes and 3 constraints (Primary key and foreign key). I wrote a script to do it: after 17 hours,
only 7600 child tables are created.

The script is still running, I can see that one child tables is created about every minute. The CPU
Usage is 100%. The query speed is really slow now (I set constraint_exclusion=on).

This stress test is for the partition plan I'm going to make, since we don't want to add another
Field just for partitioning. So is there something I did wrong? Or postgres cannot handle too many
Child tables? That way I need to come up with a new partition plan.

The system is 32-bit Linux, dual core, 4G memory. Postgres version is 8.1.21.

Thanks,
John

Responses

Browse pgsql-performance by date

  From Date Subject
Next Message Claudio Freire 2011-09-29 14:21:40 Re: Select se bloquea
Previous Message Kevin Grittner 2011-09-29 13:48:56 Re: : Create table taking time