Re: [EXTERNAL] Re: Inserts and bad performance
От | David Rowley |
---|---|
Тема | Re: [EXTERNAL] Re: Inserts and bad performance |
Дата | |
Msg-id | CAApHDvrEXuo+xhQY2mUmiihXS_2gaj9+Jq+kyjBUyDkMeoLETQ@mail.gmail.com обсуждение исходный текст |
Ответ на | RE: [EXTERNAL] Re: Inserts and bad performance ("Godfrin, Philippe E" <Philippe.Godfrin@nov.com>) |
Ответы |
RE: [EXTERNAL] Re: Inserts and bad performance
|
Список | pgsql-general |
On Thu, 25 Nov 2021 at 08:59, Godfrin, Philippe E <Philippe.Godfrin@nov.com> 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 at40GB, so there’s a good bit there, but I also did all those things on the page you referred, except for using copy. Atthis point the data has not been scrubbed, so I’m trapping data errors and duplicates. I am curios though, as sidebar,why copy is considered faster than inserts. I was unable to get COPY faster than around 25K inserts a second (prettyfast anyway). Frankly, initially I was running 3 concurrent insert jobs and getting 90K ins/sec ! but after a certainnumber of records, the speed just dropped off. EXPLAIN (ANALYZE, BUFFERS) works with INSERTs. You just need to be aware that using ANALYZE will perform the actual insert too. So you might want to use BEGIN; and ROLLBACK; if it's not data that you want to keep. SET track_io_timing = on; might help you too. David
В списке pgsql-general по дате отправления: