How comes there's no lithium-mysql-batch? #84
-
Hi, In the TechEmpower benchmark, there's lithium-postgres-batch but no lithium-mysql-batch. I'm guessing "batch" means pipelining the database requests. Why is there no lithium-mysql-batch? Isn't there an async C++ MySQL driver you can use to pipeline requests to MySQL similar to how you can do it with Postgresql? Also, what's the difference between lithium-postgres-batch and lithium-postgres-batch-beta? Thanks! |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment 1 reply
-
Batching is not async: Async means that you can communicate with the sql server without having to block the thread, but still, if one Batching (used in combination with async in lithium) means that you can send multiple requests before reading the results: There an async mode in mysql but no batching in mysql, there is one ticket but it is unassigned: lithium-postgres-batch-beta is the last version of master, I use it to check if there is no performance regresions when I try some optimizations. Also note that the postgres batch mode is not yet merged into master, it is currently a branch. |
Beta Was this translation helpful? Give feedback.
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…