pg.ddx.io  pgsql-performance@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: superman0920 <superman0920@gmail.com>
To: pgsql-performance <pgsql-performance@postgresql.org>
Subject: about multiprocessingmassdata
Date: Wed, 4 Apr 2012 23:52:51 +0800
Message-ID: <2012040423524938620013@gmail.com> (raw)

Hi list!

i have a table which has 8500000 rows records. i write a java program to update these records. 
i use 100 threads to update the records. For example, thread-1 update 1~85000 records; thread-2 update 85001~170000 and so on.
The update sql's aim is remove the space in the column and it is simple: update poi set py=replace(py,' ','') where id=?;

By the program log, i find the database of processing data speed so slow, per thread updating 1000 rows need take 260s.

BTW:  The PG Server is running on a PC. The PC's total memory is 2G and CPU is "Intel(R) Core(TM)2 Duo E7500 2.93GHz".
When the program's running, CPU just be used 1% and Memory  left 112MB.

Is the PC configuration too low cause the problem ?

Please help ~~


Thanks for any tips,



superman0920

view thread (8+ messages)  latest in thread

Message-ID: <2012040423524938620013@gmail.com>
Permalink:  ../2012040423524938620013@gmail.com/
Also on:    postgresql.org/message-id/2012040423524938620013@gmail.com

 · 

reply

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: superman0920@gmail.com
  Subject: Re: about multiprocessingmassdata
  In-Reply-To: <2012040423524938620013@gmail.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