Re: Improvements in Copy From

Поиск
Список
Период
Сортировка
От Surafel Temesgen
Тема Re: Improvements in Copy From
Дата
Msg-id CALAY4q85-V46UojNjKTuVreuAMgf8xGYbPyqZQK7oa82MrMiWQ@mail.gmail.com
обсуждение исходный текст
Ответ на Improvements in Copy From  (vignesh C <vignesh21@gmail.com>)
Ответы Re: Improvements in Copy From
Список pgsql-hackers

Hi Vignesh

On Wed, Jul 1, 2020 at 3:46 PM vignesh C <vignesh21@gmail.com> wrote:
Hi,

While reviewing copy from I identified few  improvements for copy from
that can be done :
a) copy from stdin copies lesser amount of data to buffer even though
space is available in buffer because minread was passed as 1 to
CopyGetData, Hence it only reads until the data read from libpq is
less than minread. This can be fixed by passing the actual space
available in buffer, this reduces the unnecessary frequent calls to
CopyGetData.

why not applying the same optimization on file read ?

 
c) Copy from reads header line and do nothing for the header line, we
need not clear EOL & need not convert to server encoding for the
header line.

We have a patch for column matching feature [1] that may need a header line to be further processed. Even without that I think it is preferable to process the header line for nothing than adding those checks to the loop, performance-wise.

[1]. https://www.postgresql.org/message-id/flat/CAF1-J-0PtCWMeLtswwGV2M70U26n4g33gpe1rcKQqe6wVQDrFA@mail.gmail.com

regards

Surafel 

В списке pgsql-hackers по дате отправления:

Предыдущее
От: David Rowley
Дата:
Сообщение: Re: Optimising compactify_tuples()
Следующее
От: "k.jamison@fujitsu.com"
Дата:
Сообщение: RE: [Patch] Optimize dropping of relation buffers using dlist