Re: RE: [EXTERNAL] Re: Inserts and bad performance

2021-11-29 Thread Ali .
r 24, 2021 1:50 PM >To: Godfrin, Philippe E < philippe.godf...@nov.com> >Cc: pgsql-general@lists.postgresql.org >Subject: [EXTERNAL] Re: Inserts and bad performance >  >  >  >  >On Wed, Nov 24, 2021 at 2:15 PM Godfrin, Philippe E < >philippe.godf...@nov.com> w

Re: [EXTERNAL] Re: Inserts and bad performance

2021-11-28 Thread Gavin Flower
On 28/11/21 17:17, Godfrin, Philippe E wrote: Right you are sir! I figured that out a few hours ago! pg *From:* Ron *Sent:* Wednesday, November 24, 2021 10:58 PM *To:* pgsql-general@lists.postgresql.org *Subject:* [EXTERNAL] Re: Inserts and bad performance On 11/24/21 1:15 PM, Godfrin

RE: [EXTERNAL] Re: Inserts and bad performance

2021-11-27 Thread Godfrin, Philippe E
Right you are sir! I figured that out a few hours ago! pg From: Ron Sent: Wednesday, November 24, 2021 10:58 PM To: pgsql-general@lists.postgresql.org Subject: [EXTERNAL] Re: Inserts and bad performance On 11/24/21 1:15 PM, Godfrin, Philippe E wrote: [snip] I dropped the unique index , rebuilt

RE: [EXTERNAL] Re: Inserts and bad performance

2021-11-27 Thread Godfrin, Philippe E
like to know what separates COPY from bulk inserts… pf From: Gavin Roy Sent: Wednesday, November 24, 2021 1:50 PM To: Godfrin, Philippe E Cc: pgsql-general@lists.postgresql.org Subject: [EXTERNAL] Re: Inserts and bad performance On Wed, Nov 24, 2021 at 2:15 PM Godfrin, Philippe E

RE: [EXTERNAL] Re: Inserts and bad performance

2021-11-26 Thread Godfrin, Philippe E
xplain >(analyze, buffers, verbose) and then rollback? Yes, I'm looking into that pg -Original Message- From: David Rowley Sent: Wednesday, November 24, 2021 7:13 PM To: Godfrin, Philippe E Cc: Tom Lane ; pgsql-general@lists.postgresql.org Subject: Re: [EXTERNAL] Re: Inserts a

Re: Inserts and bad performance

2021-11-24 Thread Ron
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 increas

Re: [EXTERNAL] Re: Inserts and bad performance

2021-11-24 Thread David Rowley
On Thu, 25 Nov 2021 at 08:59, Godfrin, Philippe E wrote: > Hi Tom. Good point about the index paging out of the buffer. I did that and > no change. I do have the shared buffers at 40GB, so there’s a good bit there, > but I also did all those things on the page you referred, except for using > c

Re: [EXTERNAL] Re: Inserts and bad performance

2021-11-24 Thread Michael Lewis
How many partitions? How many rows do they have when performance is slowing considerably? Does this table get many updates or is it insert only? What version of PostgreSQL? Are the inserts randomly distributed among the partitions or targeting one or a few partitions? Are you able to capture an exa

RE: [EXTERNAL] Re: Inserts and bad performance

2021-11-24 Thread Godfrin, Philippe E
The notion of COPY blocks and asynchronously is very interesting From: Gavin Roy Sent: Wednesday, November 24, 2021 1:50 PM To: Godfrin, Philippe E Cc: pgsql-general@lists.postgresql.org Subject: [EXTERNAL] Re: Inserts and bad performance On Wed, Nov 24, 2021 at 2:15 PM Godfrin, Philippe E

RE: [EXTERNAL] Re: Inserts and bad performance

2021-11-24 Thread Godfrin, Philippe E
a certain number of records, the speed just dropped off. pg From: Tom Lane Sent: Wednesday, November 24, 2021 1:32 PM To: Godfrin, Philippe E Cc: pgsql-general@lists.postgresql.org Subject: [EXTERNAL] Re: Inserts and bad performance "Godfrin, Philippe E" mailto:philippe.godf...@n

Re: Inserts and bad performance

2021-11-24 Thread Gavin Roy
On Wed, Nov 24, 2021 at 2:15 PM Godfrin, Philippe E < philippe.godf...@nov.com> 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. > On the Python client side, if you're using psycopg, y

Re: Inserts and bad performance

2021-11-24 Thread Tom Lane
"Godfrin, Philippe E" writes: > 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 seco

RE: [EXTERNAL] Re: Inserts and bad performance

2021-11-24 Thread Godfrin, Philippe E
all Sent: Wednesday, November 24, 2021 1:20 PM To: Godfrin, Philippe E Cc: pgsql-general@lists.postgresql.org Subject: [EXTERNAL] Re: Inserts and bad performance On Wed, Nov 24, 2021 at 07:15:31PM +, Godfrin, Philippe E wrote: > Greetings > I am inserting a large number of rows, 5,10,

Re: Inserts and bad performance

2021-11-24 Thread Kenneth Marshall
On Wed, Nov 24, 2021 at 07:15:31PM +, 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 wo

Inserts and bad performance

2021-11-24 Thread Godfrin, Philippe E
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