Received: from magus.postgresql.org (magus.postgresql.org [87.238.57.229]) by mail.postgresql.org (Postfix) with ESMTP id 8F3AE133FFA6 for ; Sat, 28 Jan 2012 19:58:23 -0400 (AST) Received: from [2404:130:0:10::40:2] (helo=mail.catalyst.net.nz) by magus.postgresql.org with esmtp (Exim 4.72) (envelope-from ) id 1RrIA1-0006AG-6v for pgsql-performance@postgresql.org; Sat, 28 Jan 2012 23:58:23 +0000 Received: from localhost (localhost [127.0.0.1]) by mail.catalyst.net.nz (Postfix) with ESMTP id E9111325BA; Sun, 29 Jan 2012 12:58:05 +1300 (NZDT) X-Virus-Scanned: Debian amavisd-new at catalyst.net.nz Received: from mail.catalyst.net.nz ([127.0.0.1]) by localhost (bertrand.catalyst.net.nz [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id O1xEKLhpW7BL; Sun, 29 Jan 2012 12:58:05 +1300 (NZDT) Received: from [192.168.1.65] (122-60-64-230.jetstream.xtra.co.nz [122.60.64.230]) (Authenticated sender: mark.kirkwood) by mail.catalyst.net.nz (Postfix) with ESMTPSA id 2AD8631D7D; Sun, 29 Jan 2012 12:58:05 +1300 (NZDT) Message-ID: <4F248B8C.8000906@catalyst.net.nz> Date: Sun, 29 Jan 2012 12:58:04 +1300 From: Mark Kirkwood User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:9.0) Gecko/20111229 Thunderbird/9.0 MIME-Version: 1.0 To: Jayashankar K B CC: "pgsql-performance@postgresql.org" Subject: Re: Postgress is taking lot of CPU on our embedded hardware. References: <1365276B7BDA4C40A519F0B4088230B3096F3B17@POCITMSEXMB03.LntUniverse.com> <4F22D528.6090604@enterprisedb.com> <4F22DB8A.4080104@squeakycode.net> <1365276B7BDA4C40A519F0B4088230B3096F3C0D@POCITMSEXMB03.LntUniverse.com> In-Reply-To: <1365276B7BDA4C40A519F0B4088230B3096F3C0D@POCITMSEXMB03.LntUniverse.com> Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit X-Host-Lookup-Failed: Reverse DNS lookup failed for 2404:130:0:10::40:2 (failed) X-Pg-Spam-Score: -1.1 (-) X-Archive-Number: 201201/109 X-Sequence-Number: 46121 If you can batch the inserts into groups (of say 10 to 100) it might help performance - i.e: Instead of INSERT INTO table VALUES(...); INSERT INTO table VALUES(...); ... INSERT INTO table VALUES(...); do INSERT INTO table VALUES(...),(...),...,(...); This reduces the actual number of INSERT calls, which can be quite a win. Regards Mark On 28/01/12 07:30, Jayashankar K B wrote: > Hi Heikki Linnakangas: We are using series of Insert statements to insert the records into database. > Sending data in binary is not an option as the module that writes into DB has been finalized. > We do not have control over that. > >