>connect + login was 5 ms at maximum (and I think it was much less, I just don't remember that far)
is that with creating a new connection in the pool?
we work with microservices so we have a "db gateway" so any request to the DB goes through that and it routes to the correct db server for that tenent. our latency for an already "hot" connection is about 40-50 on average but i belive the lowest number i got (for query by primary key in a kinda small table) was no less than 20-30
and opening a new connection added a couple of 10's atleast to that number
Yeah, that's a totally new connection (no pool), time from memory (could be off).
On my home system with a database I happen to be running anyway, I see:
$ time mysql -u mythtv -h 192.168.0.12 mythconverg \
-e 'select * from credits where person = 147628 limit 1' > /dev/null
real 0m0.023s
Server is running a Celeron(R) CPU 1007U @ 1.50GHz, client is Celeron(R) 2955U @ 1.40GHz, networking is 1GBps. I don't have a super easy way to measure just the connect + login time, so this is connect + login + indexed query. The server is lightly loaded, and I warmed up the table, but it's also a laptop chip on a desktop oriented board with a lowend NIC.
is that with creating a new connection in the pool? we work with microservices so we have a "db gateway" so any request to the DB goes through that and it routes to the correct db server for that tenent. our latency for an already "hot" connection is about 40-50 on average but i belive the lowest number i got (for query by primary key in a kinda small table) was no less than 20-30 and opening a new connection added a couple of 10's atleast to that number