From: | Matthias Apitz <guru(at)unixarea(dot)de> |
---|---|
To: | pgsql-general(at)lists(dot)postgresql(dot)org |
Subject: | \COPY command and indexes in tables |
Date: | 2020-11-19 07:38:45 |
Message-ID: | 20201119073845.GA13022@r314251-amd64 |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-general |
Hello,
We load large tables in some customer installation (some millions of rows)
from file with:
TRUNCATE TABLE tableName ;
\COPY tableName FROM 'fileName' WITH ( DELIMITER '|' )
and got to know that the loading nearly stops (without any real CPU
consumption) in the middle. The wild guess is that we forgot to DROP the indexes on
the tables. The doc https://www.postgresql.org/docs/13/sql-copy.html
does not give any hints related indexes.
There seems to be even tools available which address this issue on the
flight, like https://www.californiacivicdata.org/2018/01/25/index-drop-and-copy/
Any comments on this?
matthias
--
Matthias Apitz, ✉ guru(at)unixarea(dot)de, http://www.unixarea.de/ +49-176-38902045
Public GnuPG key: http://www.unixarea.de/key.pub
Без книги нет знания, без знания нет коммунизма (Влaдимир Ильич Ленин)
Without books no knowledge - without knowledge no communism (Vladimir Ilyich Lenin)
Sin libros no hay saber - sin saber no hay comunismo. (Vladimir Ilich Lenin)
From | Date | Subject | |
---|---|---|---|
Next Message | Laurenz Albe | 2020-11-19 07:57:33 | Re: \COPY command and indexes in tables |
Previous Message | Tom Lane | 2020-11-19 06:11:00 | Re: pg_upgrade from 12 to 13 failes with plpython2 |