Re: [GENERAL] Postgresql partitioning - single hot table or distributed

2010-07-02 Thread Scott Marlowe
On Tue, Jun 29, 2010 at 4:00 PM, sam mulube wrote: > Hi, > > we are considering database partitioning as a possible solution to > some performance issues we are having with our database, and we are > trying to decide on a partitioning scheme. We have a moderately write > heavy application (approx

Re: [GENERAL] Postgresql partitioning - single hot table or distributed

2010-07-02 Thread Greg Smith
Vick Khera wrote: The drawback to partitioning by an ID number using modulo is that for constraint exclusion to work you have to actually add something like "AND (my_id % 42) = 0" to match the constraint. The exclusion is not done by executing the constraint, but by proving the constraint will h

Re: [GENERAL] Postgresql partitioning - single hot table or distributed

2010-06-30 Thread Vick Khera
On Wed, Jun 30, 2010 at 10:20 AM, sam mulube wrote: > Inserting directly into the specific partition is interesting, but if > you're going to go down that route then aren't you starting to > implement the partitioning yourself in application code. In that case > what benefit does keeping the Postg

Re: [GENERAL] Postgresql partitioning - single hot table or distributed

2010-06-30 Thread sam mulube
Hi Vick, Currently we aren't deleting anything due to business requirements though at some point we will have to start deleting out some data. I suspect when we do it won't be as simple as just dropping the oldest data; some customers will have data that we want to keep permanently, while others w

Re: [GENERAL] Postgresql partitioning - single hot table or distributed

2010-06-29 Thread Vick Khera
On Tue, Jun 29, 2010 at 4:00 PM, sam mulube wrote: > Alternatively we wondered about partitioning by the server_id foreign > key, using for example the modulo of the foreign key id. This would > give us a finite number of partitions (rather than the potentially > unbounded date option), and would

[GENERAL] Postgresql partitioning - single hot table or distributed

2010-06-29 Thread sam mulube
Hi, we are considering database partitioning as a possible solution to some performance issues we are having with our database, and we are trying to decide on a partitioning scheme. We have a moderately write heavy application (approx 50 inserts per second, with writes outnumbering reads by roughl