Re: Performance of INSERT into temporary tables using psqlODBC driver

From: padusuma <venkata(dot)adusumalli(at)gmail(dot)com>
To: pgsql-performance(at)postgresql(dot)org
Subject: Re: Performance of INSERT into temporary tables using psqlODBC driver
Date: 2018-09-08 05:41:01
Message-ID: 1536385261054-0.post@n3.nabble.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-performance

>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

In response to

Responses

Browse pgsql-performance by date

  From Date Subject
Next Message Sergei Kornilov 2018-09-09 07:45:27 Re: Performance of INSERT into temporary tables using psqlODBC driver
Previous Message Justin Pryzby 2018-09-08 01:29:57 link to Slow_Query_Questions from wiki/Main Page