From superman0920@gmail.com Wed Apr 4 05:59:47 2012 Received: from magus.postgresql.org (magus.postgresql.org [87.238.57.229]) by mail.postgresql.org (Postfix) with ESMTP id 7DA844BB8E5 for ; Wed, 4 Apr 2012 02:59:47 -0300 (ADT) Received: from mail-pz0-f46.google.com ([209.85.210.46]) by magus.postgresql.org with esmtp (Exim 4.72) (envelope-from ) id 1SFJFw-0001Xg-IC for pgsql-admin@postgresql.org; Wed, 04 Apr 2012 05:59:46 +0000 Received: by dadz9 with SMTP id z9so582983dad.33 for ; Tue, 03 Apr 2012 22:59:30 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=date:from:to:reply-to:subject:x-priority:x-guid:x-has-attach :x-mailer:mime-version:message-id:content-type; bh=OslCD6wPX2/n+4MWKTUlIFWa3ZAEki153S2ybCgobYU=; b=kkcqdCxfgpRtOiCjbdhn+kCxp88dHTcmtHq52neikGssFu+JIkY2m9G7PQRK8aucWs P9ohrmLPdw40fkgv+34OiUS4Dnawz/z3qDFyBAcZqhOcEKAI/qsW5xRFHxbY5B2tXY3u QGJtAcHQcXUrwPkIaH5papk5fXNdxS4rrr/iz/F86ybTZmBvtCnX//4aCdyUfMLK3h92 ybJWAKfGxxqp2qQiPm1H9m2ZVMOnip4gomDMVLjlpyaZsgqWkFKK3Bvh/itNo6F9EyCX 63dg0lRfk/ZkMdxZbIp+6Qh/FcDW5n2BZ2fVJOcUeqS+uFEr/f0tb9L196Jy4HU7r1x1 EdRQ== Received: by 10.68.219.225 with SMTP id pr1mr3560232pbc.63.1333519170788; Tue, 03 Apr 2012 22:59:30 -0700 (PDT) Received: from imsuperman-PC ([113.224.202.112]) by mx.google.com with ESMTPS id z1sm17891368pbc.38.2012.04.03.22.59.24 (version=SSLv3 cipher=OTHER); Tue, 03 Apr 2012 22:59:30 -0700 (PDT) Date: Wed, 4 Apr 2012 13:59:30 +0800 From: superman0920 To: pgsql-admin Reply-To: superman0920 Subject: about multiprocessingmassdata X-Priority: 3 X-GUID: AD2E2813-814A-48FE-B123-7C3C8B89AD33 X-Has-Attach: no X-Mailer: Foxmail 7.0.1.88[cn] Mime-Version: 1.0 Message-ID: <201204041359218166912@gmail.com> Content-Type: multipart/alternative; boundary="----=_001_NextPart462157512730_=----" X-Pg-Spam-Score: -2.4 (--) X-Archive-Number: 201204/9 X-Sequence-Number: 39345 This is a multi-part message in MIME format. ------=_001_NextPart462157512730_=---- Content-Type: text/plain; charset="gb2312" Content-Transfer-Encoding: base64 aGkgDQppIGhhdmUgYSB0YWJsZSB3aGljaCBoYXMgODUwMDAwMCByb3dzIHJlY29yZCwgaSBydW4g MzAgdGhyZWFkcyB0byB1cGRhdGUgdGhlIHJlY29yZC4NCmkgZmluZCB0aGUgZGF0YWJhc2Ugb2Yg cHJvY2Vzc2luZyBkYXRhIHNwZWVkIHNvIHNsb3csIHBlciB0aHJlYWQgdXBkYXRpbmcgMTAwMCBy b3dzIG5lZWQgdGFrZSAyNjBzDQpIb3cgdG8gY29uZmlndXJlIHRoZSBkYXRhYmFzZSB0byBtYWtl IHByb2Nlc3Npbmcgc3BlZWQgZmFzdGVyID8gDQpQbGVhc2UgaGVscCB+fg0KDQoNCg0KDQpzdXBl cm1hbjA5MjA= ------=_001_NextPart462157512730_=---- Content-Type: text/html; charset="gb2312" Content-Transfer-Encoding: quoted-printable
hi
i have a table which has 8500000 rows record, i run 30 threads to upd= ate=20 the record.
i find the database of processing data speed so slow, per thread upda= ting=20 1000 rows need take 260s
How to configure the database to make processing speed faster ?
Please help ~~
 

superman0920
------=_001_NextPart462157512730_=------ From Kevin.Grittner@wicourts.gov Wed Apr 4 14:11:24 2012 Received: from magus.postgresql.org (magus.postgresql.org [87.238.57.229]) by mail.postgresql.org (Postfix) with ESMTP id E847F4BB8EB for ; Wed, 4 Apr 2012 11:11:24 -0300 (ADT) Received: from gwmta.wicourts.gov ([165.219.244.99] helo=gw.wicourts.gov) by magus.postgresql.org with esmtp (Exim 4.72) (envelope-from ) id 1SFQvf-0001R3-NL for pgsql-admin@postgresql.org; Wed, 04 Apr 2012 14:11:24 +0000 Received: from Courts-MTA by gw.wicourts.gov with Novell_GroupWise; Wed, 04 Apr 2012 09:11:05 -0500 Message-Id: <4F7C10280200002500046B89@gw.wicourts.gov> X-Mailer: Novell GroupWise Internet Agent 8.0.2 Date: Wed, 04 Apr 2012 09:11:04 -0500 From: "Kevin Grittner" To: "superman0920" , "pgsql-admin" Subject: Re: about multiprocessingmassdata References: <201204041359218166912@gmail.com> In-Reply-To: <201204041359218166912@gmail.com> Mime-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit Content-Disposition: inline X-Pg-Spam-Score: -4.2 (----) X-Archive-Number: 201204/14 X-Sequence-Number: 39350 superman0920 wrote: > i have a table which has 8500000 rows record, i run 30 threads to > update the record. > i find the database of processing data speed so slow, per thread > updating 1000 rows need take 260s > How to configure the database to make processing speed faster ? Performance issues are best addressed on the pgsql-performance list, not pgsql-admin. Before posting there, please read the following page so that you can post enough information for people to make useful suggestions: http://wiki.postgresql.org/wiki/SlowQueryQuestions For perspective, in benchmarks on my own machines I have seen complex data-modifying transactions running at 3000 transactions per second, and we have production systems applying millions of complex transactions per day against tables with hundreds of millions of rows while serving web applications running tens of millions of queries. So, my first thought is to wonder what the differences are in your environment, and which of them might be causing problems. To figure that out, I need to know more about your environment. -Kevin