Re: Copying records from TABLE_A to TABLE_B (in the same database)

Поиск
Список
Период
Сортировка
От Adrian Klaver
Тема Re: Copying records from TABLE_A to TABLE_B (in the same database)
Дата
Msg-id 5c9cf0c3-e530-fb39-1409-096b343b2c75@aklaver.com
обсуждение исходный текст
Ответ на Copying records from TABLE_A to TABLE_B (in the same database)  (Ron <ronljohnsonjr@gmail.com>)
Ответы Re: Copying records from TABLE_A to TABLE_B (in the same database)  (Ron <ronljohnsonjr@gmail.com>)
Список pgsql-general
On 8/2/22 11:37 AM, Ron wrote:
> AWS RDS Postgresql 12.10
> 
> There are no indices or constraints (except for NOT NULL) on table_a.
> 
> The two ways that I know are:
>      INSERT INTO table_a SELECT * FROM table_b;
> and
>      \COPY table_a TO '/tmp/table_a.tsv' WITH (FORMAT BINARY);
>      \COPY table_b FROM '/tmp/table_a.tsv' WITH (FORMAT BINARY);
> 
> Is there a faster/better way?
> 
Does table_a have existing records?

If so do you care if there are duplicates?

How large a data set are you talking about?

-- 
Adrian Klaver
adrian.klaver@aklaver.com



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

Предыдущее
От: Rob Sargent
Дата:
Сообщение: Re: Copying records from TABLE_A to TABLE_B (in the same database)
Следующее
От: Ron
Дата:
Сообщение: Re: Copying records from TABLE_A to TABLE_B (in the same database)