Re: Insert with Jsonb column hangs

Поиск
Список
Период
Сортировка
От hector vass
Тема Re: Insert with Jsonb column hangs
Дата
Msg-id CAJJx+iVXniq82bS_uT=+=VzuZ5VsuPKsryiZ5gUs2ohYEtJ7+g@mail.gmail.com
обсуждение исходный текст
Ответ на Insert with Jsonb column hangs  (kuldeep singh <kuldeeparora89@gmail.com>)
Ответы Re: Insert with Jsonb column hangs
Список pgsql-general


On Sat, Mar 9, 2024 at 3:02 PM kuldeep singh <kuldeeparora89@gmail.com> wrote:
Hi,

We are inserting data close to 1M record & having a single Jsonb column but query is getting stuck.

We are using insert into select * .. , so all the operations are within the DB.

If we are running select query individually then it is returning the data in 40 sec for all rows but with insert it is getting stuck.

PG Version - 15.

What could be the problem here ?

Regards,
KD

insert 1M rows especially JSON that can be large, variable in size and stored as blobs and indexed is not perhaps the correct way to do this
insert performance will also depend on your tuning.  Supporting transactions, users or bulk processing are 3x sides of a compromise.
you should perhaps consider that insert is for inserting a few rows into live tables ... you might be better using copy or \copy, pg_dump if you are just trying to replicate a large table

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

Предыдущее
От: hassan rafi
Дата:
Сообщение: Re: Seeing high query planning time on Azure Postgres Single Server version 11.
Следующее
От: kuldeep singh
Дата:
Сообщение: Re: Insert with Jsonb column hangs