Re: Speeding up operations
От | Hannu Krosing |
---|---|
Тема | Re: Speeding up operations |
Дата | |
Msg-id | 1060814563.4549.4.camel@fuji.krosing.net обсуждение исходный текст |
Ответ на | Speeding up operations ("Rahul_Iyer" <rahul_iyer@persistent.co.in>) |
Список | pgsql-hackers |
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
В списке pgsql-hackers по дате отправления: