Re: Load data from a csv file without using COPY

Поиск
Список
Период
Сортировка
От Steve Atkins
Тема Re: Load data from a csv file without using COPY
Дата
Msg-id D6AD71DE-88DD-4A02-B566-C1D11C20963A@blighty.com
обсуждение исходный текст
Ответ на Re: Load data from a csv file without using COPY  (Ravi Krishna <srkrishna@yahoo.com>)
Список pgsql-general
> On Jun 19, 2018, at 10:14 PM, Ravi Krishna <srkrishna@yahoo.com> wrote:
>
>>
>> If performance is relevant then your app should probably be using COPY protocol, not line by line inserts. It's
>> supported by most postgresql access libraries. If your app does that then using "\copy" from psql would be
>> an appropriate benchmark.
>
> Actually the reluctance to not use COPY is to make the benchmark same across two different RDBMS in
> two diff env.

That's something I'd only do if I intended to rig a benchmark between a RDBMS with good bulk import
and one without. If that's not your goal, your approach doesn't seem to make sense and is unlikely
to provide performance metrics that are useful or related to your app performance, unless you intend
to hamstring your app in exactly the same way you're running the benchmark.

Maybe use your app, or write ten minutes worth of code that'll interact with the database in much the
same way as your app will?

Cheers,
  Steve



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

Предыдущее
От: Ravi Krishna
Дата:
Сообщение: Re: Load data from a csv file without using COPY
Следующее
От: Rob Sargent
Дата:
Сообщение: Re: Load data from a csv file without using COPY