Configured properly, even across network (see the answers in the Twitter thread below).
[WayBack] Thread by @isotopp: “How fast is MySQL? I was casually operating under the impression, that a typical query resolution time is ~3ms. Turns out I was off one or e […]”
How fast is MySQL?
I was casually operating under the impression, that a typical query resolution time is ~3ms.
Turns out I was off one or even two orders of magnitude.
A “select version()” type of nonquery is handled in around 20µs.A typical query in a point-query or BKA environment (where id = const, … where id in (c1, c2, …)) is typically handled in 350µs.This is based on looking at
select event_name,
AVG_TIMER_WAIT/1000000 as avg_us, max_timer_wait/1000000 as max_us, min_timer_wait/1000000 as min_us from performance_schema.events_statements_summary_global_by_event_name
where event_name = ‘statement/sql/select’;| event_name | avg_us | max_us | min_us |
+———————-+———-+———–+———+
| statement/sql/select | 336.4440 | 2218.0450 | 36.4460 |for about any of our servers with that kind of workload that I have been looking at.This is obviously answered mostly from the buffer pool, because if you look at storage latencies, what you see here is that MySQL is in the same ballpark as NVME or SSD storage latencies (within 2x).TL;DR: MySQL is fucking fast, and I had no idea how to quantify fucking fast before I looked into P_S