Rahul_Iyer kirjutas K, 13.08.2003 kell 08:23: > hi... > im on a project using Postgres. The project involves, at times, upto > 5,000,000 inserts. I was checking the performance of Postgres for 5M inserts > into a 2 column table (one col=integer, 2nd col=character). I used the > Prepare... and execute method, so i basically had 5M execute statements and > 1 prepare statement. Postgres took 144min for this... is there any way to > improve this performance? if so, how? btw, im using it on a SPARC/Solaris > 2.6.
If you are inserting into an empty table with primary key (or other constraints), you can run ANALYZE on that table in 1-2 minutes after you have started the INSERTs, so that constraint-checking logic will do the right thing (use inedex for pk). in my tests I achieved about 9000 inserts/sec by using multiple inserting frontends and ~100 inserts per transaction (no indexes, 6 columns, 4 processors, 2GB memory, test clients running on same computer) -------------- Hannu ---------------------------(end of broadcast)--------------------------- TIP 2: you can get off all lists at once with the unregister command (send "unregister YourEmailAddressHere" to [EMAIL PROTECTED])