C
C
c-darwin2016-09-13 18:12:42
PostgreSQL
c-darwin, 2016-09-13 18:12:42

How to speed up insert in postgresql?

Tell me, please, what am I doing wrong?
In postgresql 9.4 with default
CREATE TABLE "ds_citizens" (
"citizen_id" bigint NOT NULL DEFAULT '0'
);
INSERT 1000 rows takes 5 sec while in sqlite3 it takes 0.1 sec

Answer the question

In order to leave comments, you need to log in

2 answer(s)
U
un1t, 2016-09-13
@c-darwin

# /etc/postgresql/9.5/main/postgresql.conf
fsync = off
synchronous_commit = off
full_page_writes = off

R
Rifat, 2016-09-14
@serber

Try using the COPY
construct

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question