Re: [SQL] Optimizing huge inserts/copy's

2000-09-05 Thread Zlatko Calusic
Jie Liang [EMAIL PROTECTED] writes: Hi, there, I tried different ways, include vaccum table , ensure index works, it still is as slow as ~100rows per minute. PGFSYNC=no in postmaster.init? Well, this might be Debian Linux specific, pardon me if it is. I have just begun playing with

Re: [SQL] Optimizing huge inserts/copy's

2000-08-30 Thread Jie Liang
Hi, there, I tried different ways, include vaccum table , ensure index works, it still is as slow as ~100rows per minute. Stephan Szabo wrote: On Tue, 29 Aug 2000, Jie Liang wrote: Hi, there, 1. use copy ... from '.'; 2. write a PL/pgSQL function and pass multiple records as

Re: [SQL] Optimizing huge inserts/copy's

2000-08-30 Thread Webb Sprague
I am experimenting with this too. If I have any indexes at all, the copy's get VERY SLOW as the table gets big. Delete ALL your indexes, do your copy's, and then create your indexes again. Good luck. --- Jie Liang [EMAIL PROTECTED] wrote: Hi, there, I tried different ways, include vaccum

Re: [SQL] Optimizing huge inserts/copy's

2000-08-30 Thread Jie Liang
Hi, I knew that if no constarint, it populate very quick, my question is: when two tables have been reloaded, then I want to add a foreign key constraint to it, say: tableA has primary key column (id) tableB has a column (id) references it, so I say: ALTER TABLE tableB ADD CONSTRAINT distfk

Re: [SQL] Optimizing huge inserts/copy's

2000-08-30 Thread Stephan Szabo
On Wed, 30 Aug 2000, Jie Liang wrote: Hi, I knew that if no constarint, it populate very quick, my question is: when two tables have been reloaded, then I want to add a foreign key constraint to it, say: tableA has primary key column (id) tableB has a column (id) references it, so I

Re: [SQL] Optimizing huge inserts/copy's

2000-08-30 Thread Tom Lane
Webb Sprague [EMAIL PROTECTED] writes: I am experimenting with this too. If I have any indexes at all, the copy's get VERY SLOW as the table gets big. Delete ALL your indexes, do your copy's, and then create your indexes again. Do you have a lot of equal index keys in the data you're

Re: [SQL] Optimizing huge inserts/copy's

2000-08-29 Thread Jie Liang
Hi, there, 1. use copy ... from '.'; 2. write a PL/pgSQL function and pass multiple records as an array. However, if your table have a foreign key constraint, it cannot be speed up, I have same question as you, my table invloving 9-13 million rows, I don't know how can I add a foreign key

Re: [SQL] Optimizing huge inserts/copy's

2000-08-29 Thread Stephan Szabo
On Tue, 29 Aug 2000, Jie Liang wrote: Hi, there, 1. use copy ... from '.'; 2. write a PL/pgSQL function and pass multiple records as an array. However, if your table have a foreign key constraint, it cannot be speed up, I have same question as you, my table invloving 9-13