pg.ddx.io  pgsql-general@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Kenneth Marshall <ktm@rice.edu>
To: Godfrin, Philippe E <Philippe.Godfrin@nov.com>
Cc: pgsql-general@lists.postgresql.org <pgsql-general@lists.postgresql.org>
Subject: Re: Inserts and bad performance
Date: Wed, 24 Nov 2021 13:20:10 -0600
Message-ID: <20211124192010.GB8058@aart.rice.edu> (raw)
In-Reply-To: <SA0PR15MB3933E7B425ADC5DC36D9A8CC82619@SA0PR15MB3933.namprd15.prod.outlook.com>
References: <SA0PR15MB3933E7B425ADC5DC36D9A8CC82619@SA0PR15MB3933.namprd15.prod.outlook.com>

On Wed, Nov 24, 2021 at 07:15:31PM +0000, Godfrin, Philippe E wrote:
> Greetings
> I am inserting a large number of rows, 5,10, 15 million. The python code commits every 5000 inserts. The table has partitioned children.
> 
> At first, when there were a low number of rows inserted, the inserts would run at a good clip - 30 - 50K inserts per second. Now, after inserting oh say 1.5 Billion rows, the insert rate has dropped to around 5000 inserts per second. I dropped the unique index , rebuilt the other indexes and no change. The instance is 16 vcpu and 64GB ram.
> 
> I'm perplexed, I can't see to find any reason for the slow down...
> Thanks,
> pg

Hi,

With not much information, it may be I/O related. CPU and RAM cannot fix
that once items need to be written to disk. Are there any errors in the
logs or CPUs maxxed out?

Regards,
Ken





view thread (15+ messages)  latest in thread

Message-ID: <20211124192010.GB8058@aart.rice.edu>
Permalink:  ../20211124192010.GB8058@aart.rice.edu/
Also on:    postgresql.org/message-id/20211124192010.GB8058@aart.rice.edu

 · 

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 from your mail client; the link fills in
  the headers below: reply via email
  Some clients, webmail especially, drop In-Reply-To and References from
  a link, and the reply then starts a new thread: use the mbox below.

  To: pgsql-general@postgresql.org
  Cc: ktm@rice.edu, Philippe.Godfrin@nov.com
  Subject: Re: Inserts and bad performance
  In-Reply-To: <20211124192010.GB8058@aart.rice.edu>
  References: <SA0PR15MB3933E7B425ADC5DC36D9A8CC82619@SA0PR15MB3933.namprd15.prod.outlook.com> <20211124192010.GB8058@aart.rice.edu>

* 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