pg.ddx.io  pgsql-general@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Ron <ronljohnsonjr@gmail.com>
To: pgsql-general@lists.postgresql.org
Subject: Re: Inserts and bad performance
Date: Wed, 24 Nov 2021 22:58:19 -0600
Message-ID: <19b129be-79c7-18ca-de3c-b6ca170e64cd@gmail.com> (raw)
In-Reply-To: <SA0PR15MB3933E7B425ADC5DC36D9A8CC82619@SA0PR15MB3933.namprd15.prod.outlook.com>
References: <SA0PR15MB3933E7B425ADC5DC36D9A8CC82619@SA0PR15MB3933.namprd15.prod.outlook.com>

On 11/24/21 1:15 PM, Godfrin, Philippe E wrote:
[snip]
> I dropped the unique index , rebuilt the other indexes and no change.

IMNSHO, this is the worst possible approach.  Drop everything *except* the 
unique index, and then (if possible) sort the input file by the unique 
key.   That'll increase buffered IO; otherwise, you're bopping all around 
the filesystem.

Using a bulk loader if possible would increase speeds

-- 
Angular momentum makes the world go 'round.

view thread (15+ messages)  latest in thread

Message-ID: <19b129be-79c7-18ca-de3c-b6ca170e64cd@gmail.com>
Permalink:  ../19b129be-79c7-18ca-de3c-b6ca170e64cd@gmail.com/
Also on:    postgresql.org/message-id/19b129be-79c7-18ca-de3c-b6ca170e64cd@gmail.com

 · 

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: ronljohnsonjr@gmail.com
  Subject: Re: Inserts and bad performance
  In-Reply-To: <19b129be-79c7-18ca-de3c-b6ca170e64cd@gmail.com>
  References: <SA0PR15MB3933E7B425ADC5DC36D9A8CC82619@SA0PR15MB3933.namprd15.prod.outlook.com> <19b129be-79c7-18ca-de3c-b6ca170e64cd@gmail.com>

* 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