Skip to content
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

Use batch inserts #1

Closed
LetsMelon opened this issue May 21, 2023 · 3 comments
Closed

Use batch inserts #1

LetsMelon opened this issue May 21, 2023 · 3 comments
Labels
enhancement New feature or request good first issue Good for newcomers

Comments

@LetsMelon
Copy link
Owner

sqlx::query("insert into spr_spar_price (spr_price, spr_sales_unit, spr_price_unit, spr_sp_product, spr_sr_raw) values ( $1, $2, $3, $4, $5 )")

@LetsMelon LetsMelon added enhancement New feature or request good first issue Good for newcomers labels May 21, 2023
@LetsMelon
Copy link
Owner Author

See launchbadge/sqlx#294 and a workaround with QueryBuilder::push_values

@LetsMelon
Copy link
Owner Author

fixed in 99010ff

@LetsMelon
Copy link
Owner Author

data: 18128 products
single inserts: ~50s
batch inserts (16): ~28s

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request good first issue Good for newcomers
Projects
None yet
Development

No branches or pull requests

1 participant