On Fri, 16 Oct 2020 at 22:05, Justin Pryzby <pry...@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/