The Stack Overflow podcast is back! Listen to an interview with our new CEO.

New answers tagged

0

Another way is to use count_estimate function to get an idea of the progress counting the records with a SELECT count_estimate('SELECT * FROM REGDATA')


1

There is no built in way to monitor the progress. v12 has added progress monitoring for some actions, but not for COPY. What I have done in this situation is use strace -s 1024 -y -p <backend pid> to get a trace of the loading process. This will show what data it is reading from the "/home/dani/Documents/utf8_regdata.out" file (along with a bunch of ...


0

You may try to edit your mysqldump file to remove indexes. It's just a text file with SQL statements, so you need to somehow find CREATE TABLE statements in it and remove KEY lines from them (except from PRIMARY KEY). But that can hardly help with the speed because InnoDB index creation is quite efficient and doesn't take overhead time compared to separate ...


1

There is no way to do that with COPY alone. You either have to pre-process or post-process the data. Perhaps UNLOGGED tables can make this a little bit faster: /* no WAL logging for better performance */ CREATE UNLOGGED TABLE test1 (v1 double precision); COPY test1 FROM STDIN; Enter data to be copied followed by a newline. End with a backslash and a ...


Top 50 recent answers are included