Re: should INSERT SELECT use a BulkInsertState?
От | Simon Riggs |
---|---|
Тема | Re: should INSERT SELECT use a BulkInsertState? |
Дата | |
Msg-id | CANP8+jKmvtaq8a1YkKsfXpWOc3keN2k7K84Su+y--WZO6D_jFQ@mail.gmail.com обсуждение исходный текст |
Ответ на | Re: should INSERT SELECT use a BulkInsertState? (Justin Pryzby <pryzby@telsasoft.com>) |
Ответы |
Re: should INSERT SELECT use a BulkInsertState?
|
Список | pgsql-hackers |
On Fri, 16 Oct 2020 at 22:05, Justin Pryzby <pryzby@telsasoft.com> wrote: > > > I made this conditional on BEGIN BULK/SET bulk, so I'll solicit comments on that. I think it would be better if this was self-tuning. So that we don't allocate a bulkinsert state until we've done say 100 (?) rows inserted. If there are other conditions under which this is non-optimal (Andres?), we can also autodetect that and avoid them. You should also use table_multi_insert() since that will give further performance gains by reducing block access overheads. Switching from single row to multi-row should also only happen once we've loaded a few rows, so we don't introduce overahads for smaller SQL statements. -- Simon Riggs http://www.EnterpriseDB.com/
В списке pgsql-hackers по дате отправления: