ODBC and MySQLClient

I am currently using ODBC to connect to my MySQL database using C #. I was told that using MySql Connector would be better, faster and not dependent on Windows. Can someone shed some light on this, please? I have not yet been able to find anything on the net.

+4
source share
2 answers

I'm not sure what you are asking for tbh. But ODBC is a common provider, and the mysql provider is specific to mysql db. Therefore, a particular provider can be more optimized regarding mysql and preform is better. Both ODBC and the mysql provider are available for mono (linux, unix) and .net (windows), but it is always recommended to use a specific provider, if any.

+3
source

Write a test application (well, I suppose, two applications - one for ODBC and one for MySql Connector) and measure the difference in performance. Make sure you drop the caches / censer / sacrifice to the god or gods of your choice / etc. (I don’t know if this is possible on MySql) between runs. I used to do this (minus incense and sacrifices, so the results may have been unintentionally distorted) with other database access tools, and found that ODBC adds overhead of 5% to simple, quick queries so that it doesn't effectively overlap for complex, lengthy requests. YMMV.

Share and enjoy.

+2
source

Source: https://habr.com/ru/post/1308885/


All Articles