COPY slows down; is it normal?
COPY slows down; is it normal?
От:
"Gene Selkov Jr." <selkovjr@mcs.anl.gov>
Дата:
Hi, I am watching the progress of a COPY from a 2 megarow table. It seems to slow down almost exponentially. The database file grew at about 2 megabytes a minute in the beginning and now, 20 hours since started, it grows at 80 kilobytes a minute. The table has 7 columns of char and int types, the last column is text. The scene is a dual 400MHz i586 running RedHat 5.1 and postgres 6.3.2, as originally distributed, no patches. As far as I can tell by 'tail | strings | tail' on the database file, it is more than halfway there, but such exponential slowdown makes me anxious. Other users will have to take vacation: PID USER PRI NI SIZE RSS SHARE STAT LIB %CPU %MEM TIME COMMAND 14778 postgres 10 0 2840 2588 2124 R 0 98.2 1.0 1273m postgres Last time I tried to load the same table without the last column, COPY took 4 hours and hash on one of the columns took 7. Is there any room for improvement? Thanks, Gene
Re: [ADMIN] COPY slows down; is it normal?
От:
"Gene Selkov Jr." <selkovjr@mcs.anl.gov>
Дата:
Hi, I just complained about the slow copy operation a few hours ago. I think it came to uneventful end, at least as far as I can tell (nothing too bad in the logfile). The psql client I used to start this copy command detached at some point because of the network timeout, but the backend itself seemed to be working all the time and it finished just recently. As a result, I have a huge table that I can't query. This query runs for a minute and returns nothing: emp=> select count(*) from key tag|id|rel|pos|item|unit|data ---+--+---+---+----+----+---- (0 rows) Likewise, any other query against this table retrns nothing. Is there anything that might go wrong because the client detached? Can I fix it? Thanks, Gene