Skip to content

Bulk import: recommend 128 inserts per batch for java #4399

@bdarnell

Description

@bdarnell

PGJDBC's batching support is bizarre and magical: it only works with powers of two, and will split batches of other sizes up into multiple sub-batches. This means that a batch of size 128 can be 6x faster than a batch of size 250. We should adjust our docs to recommend batches of exactly 128 for java users (for other languages, around 500 is still optimal. Maybe change the recommendation to 512 in case other libraries are sensitive to powers of two).

Metadata

Metadata

Assignees

Labels

Type

No type

Projects

No projects

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions