-
Notifications
You must be signed in to change notification settings - Fork 46
Batching support #29
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
Comments
The StmtParam::FetchArraySize option is for queries, using it for updates will only increase the amount of memory your program need. The batch support works, I personally tested the latest version of rust-oracle with a 19c database and performance is quite good, If summary your code should look like this:
Some numbers: running the above code using two VMs in the same machine, one runing the rust program and the other the DB in a container with 10k records, got 1970 ms, now putting all the logic inside a SQL string block and running it with the same stmt.execute got only 104 ms which is fater than my 145 ms using a SQL tool with Java thin driver. Hope this help, |
Thanks for your comment. |
Sorry for not replying for so long time. Batching is efficient when the network distance between the client and the server is long. Well, I'll implement it in two or three weeks. |
I added batch support. See the following doc comment. I'll release it after I add notice that batch errors and row counts are available only when both the client and the server are Oracle 12.1 or upper. Lines 227 to 406 in 0f62963
|
Rust-oracle 0.5.1 was published. It includes batching support. |
Hi @rgutierrez2004 , could you give a bit more detail on "putting all the logic inside a SQL string block" please? Do you mean also including the ID and time stamp generation into the SQL script? If yes, can you share the final script as an example? Thanks in advance!
|
Thanks a lot @kubo should I close the issue or let you do it? |
Hello, and thanks a lot for your work.
I'd like to replace the following JDBC code:
Which runs decently fast (a few hundred ms for 10k entries)
I naively tried to run:
But unfortunately it takes way too much time as the number of
ids
increase. (More than 10s for 10k entries).I see in README there's "Batch support" mentioned.
I guess this covers such feature, am I right?
If so, well, thank you!
And could you please notify me by closing this issue whenever you have time to implement it?
This way I would know I can go back to dealing with Oracle in Rust!
Thanks a lot.
The text was updated successfully, but these errors were encountered: