Using the mariadb-connector-nodejs client instead of mysql2
Prerequisites
- [X] I have written a descriptive issue title
- [X] I have searched existing issues to ensure the feature has not already been requested
🚀 Feature Proposal
I wanted to suggest using the mariadb-connector-nodejs client as it claims to offer much higher performance compared to mysql2. I have used it in several projects with excellent results. However, I have never conducted independent benchmarks on the two clients.
Motivation
The motivation is to make everything as fast as possible. Following the philosophy of Fastify
Example
No response
I'm afraid it mighht be a bit of a breaking change, as I expect the two modules to have different APIs.
In this article (https://mariadb.com/resources/blog/which-node-js-connector-is-best-to-use/) where they do some benchmarking on the main MySQL clients for Node, they claim that mysql2 and mariadb share the same API as the mysql connector, which is why I suggested it.
They say the client implementations are compatible, I think this could be very cool area to explore — it's quite a bit more performant
+3 from my side. I would love to migrate to the faster mariadb package instead of mysql2.
Client implementations are indeed compatible, if that is really not the case. We could always create a separate Fastify plugin??