Re: [GENERAL] Partitioning an existing table

2011-04-30 Thread Dimitri Fontaine
disclaimer : I didn't read the presentation paper Greg Smith talked about yet, nor his partitioning chapter yet, so it might be about the same trick. Phoenix Kiula writes: > How about doing this with existing massive tables? (Over 120 million rows) > > I could create a new parent table with chil

Re: [GENERAL] Partitioning an existing table

2011-04-29 Thread Greg Smith
Vick Khera wrote: I've been trying to get the OSCON folk to accept this talk for several years now, to reach a wider audience. Seems they don't like me... :( Too specific for OSCON. It's not you, it's the topic. I've tried submitting far more generic things than that, but still with a Post

Re: [GENERAL] Partitioning an existing table

2011-04-29 Thread Raghavendra
> > Thanks everyone for the excellent suggestions. >> >> Vick/Greg, thanks in particular for this reference. The doc gives me >> ideas for other things too! >> > > +1 > I've been trying to get the OSCON folk to accept this talk for several > years now, to reach a wider audience. Seems they don't

Re: [GENERAL] Partitioning an existing table

2011-04-29 Thread Vick Khera
On Thu, Apr 28, 2011 at 12:12 AM, Phoenix Kiula wrote: > > Vick's presentation at > > > http://cdn.mailermailer.com/documents/PGCon2008TablePartitioningCaseStudy.pdf > > > Thanks everyone for the excellent suggestions. > > Vick/Greg, thanks in particular for this reference. The doc gives me > idea

Re: [GENERAL] Partitioning an existing table

2011-04-27 Thread Phoenix Kiula
On Tue, Apr 26, 2011 at 8:28 PM, Greg Smith wrote: > On 04/25/2011 10:10 AM, Vick Khera wrote: >> >> Basically, you create your partitions and set up the necessary triggers >> you want (I re-write the app to insert directly into the correct partition). >>  Then all new data starts going into the p

Re: [GENERAL] Partitioning an existing table

2011-04-26 Thread Greg Smith
On 04/25/2011 10:10 AM, Vick Khera wrote: Basically, you create your partitions and set up the necessary triggers you want (I re-write the app to insert directly into the correct partition). Then all new data starts going into the partitions. Next, write a program that loops over the current

Re: [GENERAL] Partitioning an existing table

2011-04-26 Thread Raghavendra
> > so now when your running application goes to query the table, it gets > doubles? if you do it in transactions, then how long are you going to cause > the master table to be locked when doing such a bulk delete? > > my point is to minimize service interruption, and that means moving small > hun

Re: [GENERAL] Partitioning an existing table

2011-04-25 Thread Vick Khera
On Mon, Apr 25, 2011 at 10:53 AM, Raghavendra < raghavendra@enterprisedb.com> wrote: > 1. Send all the data to .csv file with COPY TO command of the base > table(which will undergo for partition). > 2. Create the partition setup with TRIGGER's > 3. Use COPY FROM command for inserting data into

Re: [GENERAL] Partitioning an existing table

2011-04-25 Thread Raghavendra
On Mon, Apr 25, 2011 at 7:40 PM, Vick Khera wrote: > On Mon, Apr 25, 2011 at 6:46 AM, Phoenix Kiula wrote: > >> I could create a new parent table with child tables, and then INSERT >> all these millions of rows to put them into the right partition. But >> is that recommended? >> > > I did this tw

Re: [GENERAL] Partitioning an existing table

2011-04-25 Thread Vick Khera
On Mon, Apr 25, 2011 at 6:46 AM, Phoenix Kiula wrote: > I could create a new parent table with child tables, and then INSERT > all these millions of rows to put them into the right partition. But > is that recommended? > I did this twice (several years ago). Basically, you create your partitions

Re: [GENERAL] Partitioning an existing table

2011-04-25 Thread David Johnston
ula Cc: PG-General Mailing List Subject: Re: [GENERAL] Partitioning an existing table 2011/4/25 Phoenix Kiula : > Hi. > > The partitioning documentation in PG is very clear on how to partition > a new table. Create child tables, and have triggers that manage > INSERT, UPDATE and DELET

Re: [GENERAL] Partitioning an existing table

2011-04-25 Thread Cédric Villemain
2011/4/25 Phoenix Kiula : > Hi. > > The partitioning documentation in PG is very clear on how to partition > a new table. Create child tables, and have triggers that manage > INSERT, UPDATE and DELETE commands. > > How about doing this with existing massive tables? (Over 120 million rows) > > I cou

[GENERAL] Partitioning an existing table

2011-04-25 Thread Phoenix Kiula
Hi. The partitioning documentation in PG is very clear on how to partition a new table. Create child tables, and have triggers that manage INSERT, UPDATE and DELETE commands. How about doing this with existing massive tables? (Over 120 million rows) I could create a new parent table with child t