The Wiert Corner – irregular stream of stuff

Jeroen W. Pluimers on .NET, C#, Delphi, databases, and personal interests

  • My badges

  • Twitter Updates

  • My Flickr Stream

  • Pages

  • All categories

  • Enter your email address to subscribe to this blog and receive notifications of new posts by email.

    Join 2,482 other followers

@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 1-2 orders of magnitude…

Posted by jpluimers on 2021/07/13

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

Twitter thread: [WayBack] Kristian Köhntopp on Twitter: “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.”

–jeroen

 

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Google photo

You are commenting using your Google account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s

This site uses Akismet to reduce spam. Learn how your comment data is processed.

 
%d bloggers like this: