-
Notifications
You must be signed in to change notification settings - Fork 459
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Bulk import: recommend 128 inserts per batch for java #4399
Labels
C-doc-improvement
O-external
Origin: Issue comes from external users.
P-1
High priority; must be done this release
T-missing-info
Milestone
Comments
jseldess
added
O-external
Origin: Issue comes from external users.
T-missing-info
A-sql
P-1
High priority; must be done this release
labels
Feb 26, 2019
@rmloveland, can you factor this in while working on #4621 with @timveil? |
rmloveland
added a commit
that referenced
this issue
May 30, 2019
Fixes #4621, #3578, #4399. Summary of changes: - Update 'Build a Java App with CockroachDB' to use the Java DAO pattern - Add a 'Recommended Practices' section that includes information about IMPORT, recommended batch size, and the JDBC INSERT rewriting flag TODO: - Update "secure" code sample to use certs. Not worth doing yet until this code is reviewed by someone with Java expertise and updated to match good style, etc. Once that is done, the secure code sample in this PR will be updated with the necessary cert munging.
rmloveland
added a commit
that referenced
this issue
Jun 6, 2019
Fixes #4621, #3578, #4399. Summary of changes: - Update 'Build a Java App with CockroachDB' to use: - the Java DAO pattern - JDBC - code for automatically retrying in case of txn retry errors - an example of fast bulk insertion using JDBC batching - Add a 'Recommended Practices' section that includes information about IMPORT, recommended batch size, and the JDBC INSERT rewriting flag
rmloveland
added a commit
that referenced
this issue
Jun 17, 2019
Fixes #4621, #3578, #4399. Summary of changes: - Update 'Build a Java App with CockroachDB' to use: - the Java DAO pattern - JDBC - code for automatically retrying in case of txn retry errors - an example of fast bulk insertion using JDBC batching - Add a 'Recommended Practices' section that includes information about IMPORT, recommended batch size, and the JDBC INSERT rewriting flag
rmloveland
added a commit
that referenced
this issue
Jun 20, 2019
Fixes #4621, #3578, #4399. Summary of changes: - Update 'Build a Java App with CockroachDB' to use: - the Java DAO pattern - JDBC - code for automatically retrying in case of txn retry errors - an example of fast bulk insertion using JDBC batching - Add a 'Recommended Practices' section that includes information about IMPORT, recommended batch size, and the JDBC INSERT rewriting flag
rmloveland
added a commit
that referenced
this issue
Jun 24, 2019
Summary of changes: - Update 'Build a Java App with CockroachDB' to use: - the Java DAO pattern - JDBC - code for automatically retrying in case of txn retry errors - an example of fast bulk insertion using JDBC batching - Add a 'Recommended Practices' section that includes information about IMPORT, recommended batch size, and the JDBC INSERT rewriting flag Does all of the above for versions 19.1 and 19.2. Fixes #4621, #3578, #4399.
rmloveland
added a commit
that referenced
this issue
Jun 25, 2019
Summary of changes: - Update 'Build a Java App with CockroachDB' to use: - the Java DAO pattern - JDBC - code for automatically retrying in case of txn retry errors - an example of fast bulk insertion using JDBC batching - Add a 'Recommended Practices' section that includes information about IMPORT, recommended batch size, and the JDBC INSERT rewriting flag Does all of the above for versions 19.1 and 19.2. Fixes #4621, #3578, #4399.
Fixed by #4855 |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Labels
C-doc-improvement
O-external
Origin: Issue comes from external users.
P-1
High priority; must be done this release
T-missing-info
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).
The text was updated successfully, but these errors were encountered: