Skip to content

How comes there's no lithium-mysql-batch? #84

Answered by matt-42
selforganized asked this question in Q&A
Discussion options

You must be logged in to vote

Hi @selforganized

Batching is not async:

Async means that you can communicate with the sql server without having to block the thread, but still, if one
handler sends several sql requests to an sql server, it needs to read the result of request N before sending request N+1:
sending R1 -> waiting R1 results -> sending R2 -> waiting R2 results -> ...

Batching (used in combination with async in lithium) means that you can send multiple requests before reading the results:
sending R1, R2, .... -> waiting for all the results.
This way is faster because it relies on less network operations, i.e less waiting time for the sql server and the client.

There an async mode in mysql but no batching in m…

Replies: 1 comment 1 reply

Comment options

You must be logged in to vote
1 reply
@selforganized
Comment options

Answer selected by selforganized
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants