basic mysql query takes around 170ms to complete
Hey,
I'm working on a project that uses MariaDB. Currently I'm using
MySqlConnector
with Dapper
and I just noticed that even a smallest query takes around ~170ms, it doesn't matter if the table has either 4 rows or 16k. I tried with and without Dapper because I thought that maybe dapper's mapping might takes that much time, but even with the simplest example it takes around that time. Can someone please enlighten me whats wrong with it or am I going crazy?
In the below example both of the query takes as much time.
2 Replies
you have to do some tests, take the network time and the query time so that you know who has the fault
have you tried with a client? (command line, for example)
the query takes like 0,2ms to run in command line, also I connect to a localhost server
I also created an empty project with .NET 7 to see if I have something messed up in my project or not
hmmmm looks like something is up with MariaDB server, it is faster with MySQL database, but one strange thing is that the first
Query
takes 100-200ms to complete, but after that all the query runs in 1-2ms or so