0

I'm aware that failed upserts will cause an increment in auto-incrementing fields, but are there any other considerations to keep in mind when using ON CONFLICT DO NOTHING when inserting millions of rows continuously?

Will it cause any other type of bloat on the tables if they are lacking any auto-incrementing field?

Is it considered a non-performant technique for large bulk upserts/inserts?

Z. M.
  • 329
  • 5
  • 13

1 Answers1

0

INSERT ... ON CONFLICT DO NOTHING will not cause any kind of bloat. This is a good method to load data.

All that is independent of the existence of an auto-incremented primary key, but of course you need a primary key or unique constraint, otherwise you would never get a conflict.

Laurenz Albe
  • 209,280
  • 17
  • 206
  • 263