pg.ddx.io  pgsql-performance@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Mark Kirkwood <mark.kirkwood@catalyst.net.nz>
To: Jayashankar K B <Jayashankar.KB@lnties.com>
Cc: pgsql-performance@postgresql.org <pgsql-performance@postgresql.org>
Subject: Re: Postgress is taking lot of CPU on our embedded hardware.
Date: Sun, 29 Jan 2012 12:58:04 +1300
Message-ID: <4F248B8C.8000906@catalyst.net.nz> (raw)
In-Reply-To: <1365276B7BDA4C40A519F0B4088230B3096F3C0D@POCITMSEXMB03.LntUniverse.com>
References: <1365276B7BDA4C40A519F0B4088230B3096F3B17@POCITMSEXMB03.LntUniverse.com>
	<4F22D528.6090604@enterprisedb.com>
	<4F22DB8A.4080104@squeakycode.net>
	<1365276B7BDA4C40A519F0B4088230B3096F3C0D@POCITMSEXMB03.LntUniverse.com>

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.
>
>



view thread (15+ messages)  latest in thread

Message-ID: <4F248B8C.8000906@catalyst.net.nz>
Permalink:  ../4F248B8C.8000906@catalyst.net.nz/
Also on:    postgresql.org/message-id/4F248B8C.8000906@catalyst.net.nz

 · 

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: mark.kirkwood@catalyst.net.nz, Jayashankar.KB@lnties.com
  Subject: Re: Postgress is taking lot of CPU on our embedded hardware.
  In-Reply-To: <4F248B8C.8000906@catalyst.net.nz>

* 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