From: padusuma <venkata.adusumalli@gmail.com>
To: pgsql-performance@postgresql.org
Subject: Re: Performance of INSERT into temporary tables using psqlODBC driver
Date: Fri, 7 Sep 2018 22:41:01 -0700 (MST)
Message-ID: <1536385261054-0.post@n3.nabble.com> (raw)
In-Reply-To: <8736uk6eh5.fsf@gmail.com>
References: <1536339842382-0.post@n3.nabble.com>
<8736uk6eh5.fsf@gmail.com>
>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
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Reply to all the recipients using the --to and --cc options:
reply via email
To: pgsql-performance@postgresql.org
Cc: venkata.adusumalli@gmail.com
Subject: Re: Performance of INSERT into temporary tables using psqlODBC driver
In-Reply-To: <1536385261054-0.post@n3.nabble.com>
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox