Re: [GENERAL] Inserting millions of record in a partitioned Table

Поиск
Список
Период
Сортировка
От Vick Khera
Тема Re: [GENERAL] Inserting millions of record in a partitioned Table
Дата
Msg-id CALd+dcf6QTOduB21kd=6JGBTd2aJu=KPGtNew0ViEr6KuzbRwA@mail.gmail.com
обсуждение исходный текст
Ответ на [GENERAL] Inserting millions of record in a partitioned Table  (Job <Job@colliniconsulting.it>)
Ответы Re: [GENERAL] Inserting millions of record in a partitioned Table  (Rob Sargent <robjsargent@gmail.com>)
Список pgsql-general
On Wed, Sep 20, 2017 at 10:10 AM, Job <Job@colliniconsulting.it> wrote:
We noticed that if we import directly into the global table it is really, really slow.
Importing directly in the single partition is faster.


Do you have a rule or trigger on the main table to redirect to the partitions? You should expect that to take some extra time *per row*. Your best bet is to just import into the proper partition and make sure your application produces batch files that align with your partitions.

Either that or write a program that reads the data, determines the partition, and then inserts directly to it. It might be faster.

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

Предыдущее
От: Tom Lane
Дата:
Сообщение: Re: [GENERAL] Puzzled by UNION with iso-8859-1 types
Следующее
От: Rob Sargent
Дата:
Сообщение: Re: [GENERAL] Inserting millions of record in a partitioned Table