Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtp (Exim 4.80) (envelope-from ) id 1Yz2vk-0002ZT-5L for pgsql-performance@arkaria.postgresql.org; Sun, 31 May 2015 13:05:32 +0000 Received: from localhost ([127.0.0.1] helo=postgresql.org) by malur.postgresql.org with smtp (Exim 4.80) (envelope-from ) id 1Yz2vi-000756-2Q for pgsql-performance@arkaria.postgresql.org; Sun, 31 May 2015 13:05:30 +0000 Received: from magus.postgresql.org ([2a02:c0:301:0:ffff::29]) by malur.postgresql.org with esmtps (TLS1.2:RSA_AES_256_CBC_SHA256:256) (Exim 4.80) (envelope-from ) id 1Yz2vf-00074x-Vo for pgsql-performance@postgresql.org; Sun, 31 May 2015 13:05:28 +0000 Received: from vms173017pub.verizon.net ([206.46.173.17]) by magus.postgresql.org with esmtps (TLS1.0:DHE_RSA_AES_256_CBC_SHA1:256) (Exim 4.84) (envelope-from ) id 1Yz2vW-0007B0-UG for pgsql-performance@postgresql.org; Sun, 31 May 2015 13:05:26 +0000 Received: from DellT7600.localdomain ([96.234.58.218]) by vms173017.mailsrvcs.net (Oracle Communications Messaging Server 7.0.5.32.0 64bit (built Jul 16 2014)) with ESMTPA id <0NP700DSITOB7000@vms173017.mailsrvcs.net> for pgsql-performance@postgresql.org; Sun, 31 May 2015 08:04:59 -0500 (CDT) X-CMAE-Score: 0 X-CMAE-Analysis: v=2.1 cv=ff9QsBkF c=1 sm=1 tr=0 a=PLgginyI3sRVgx97pdBqlw==:117 a=KOg_qkMfzZkA:10 a=N659UExz7-8A:10 a=o1OHuDzbAAAA:8 a=oR5dmqMzAAAA:8 a=-9mUelKeXuEA:10 a=h1PgugrvaO0A:10 a=oct3qPWNAAAA:8 a=MxxIyum4ET28wwyMY8MA:9 a=pILNOxqGKmIA:10 Message-id: <556B06FA.3000305@verizon.net> Date: Sun, 31 May 2015 09:04:58 -0400 From: Jean-David Beyer Organization: Institute for Regimented Whimsey User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:31.0) Gecko/20100101 Thunderbird/31.7.0 MIME-version: 1.0 To: pgsql-performance@postgresql.org Subject: Re: Postgres is using 100% CPU References: <5568BBFF.8080807@2ndquadrant.com> In-reply-to: Content-type: text/plain; charset=windows-1252 Content-transfer-encoding: 7bit X-Pg-Spam-Score: -1.9 (-) List-Archive: List-Help: List-ID: List-Owner: List-Post: List-Subscribe: List-Unsubscribe: X-Mailing-List: pgsql-performance Precedence: bulk Sender: pgsql-performance-owner@postgresql.org On 05/30/2015 09:46 AM, Ashik S L wrote: > We are using postgres SQL version 8.4.17.. > Postgres DB szie is 900 MB and we are inserting 273 rows at once .and > each row is of 60 bytes.Every time we insert 16380 bytes of data. Way back when, I was inserting a lot of rows of date (millions of rows) and it was taking many hours on a machine with 6 10,000 rpm Ultra/320 SCSI hard drives and 8 GBytes of ram. Each insert was a separate transaction. When I bunched up lots of rows (thousaands) into a single transaction, the whole thing took less than an hour. Is it possible that when you insert 273 rows at once, you are doing it as 273 transactions instead of one? -- .~. Jean-David Beyer Registered Linux User 85642. /V\ PGP-Key:166D840A 0C610C8B Registered Machine 1935521. /( )\ Shrewsbury, New Jersey http://linuxcounter.net ^^-^^ 09:00:01 up 3 days, 9:57, 2 users, load average: 4.89, 4.90, 4.91 -- Sent via pgsql-performance mailing list (pgsql-performance@postgresql.org) To make changes to your subscription: http://www.postgresql.org/mailpref/pgsql-performance