>We are inserting large numbers (millions) of rows into a postgres >database from a Javascript application and found using the COPY command >was much, much faster than doing regular inserts (even with multi-insert >commit). If you can do this using the driver you are using, that will >give you the largest performance boost. The data to be inserted into temporary tables is obtained from one or more queries run earlier and the data is available as a vector of strings. If I need to use COPY FROM command, then the application would need to create a file with the data to be inserted and the file needs to be readable by the user running database server process, which may not be always possible unless the application is running on the same host. I think this approach may not be feasible for our application. I have increased the value for /temp_buffers/ server parameter from the default 8 MB to 128 MB. However, this change did not affect the INSERT time for temporary tables. -- Sent from: http://www.postgresql-archive.org/PostgreSQL-performance-f2050081.html