2

I am seeing unexpected behavior with some MySQL performance.

When I run a simple query SELECT 1; on my local host (MySQL 5.6.x) using workbench, it executes in 0.000s, but the same query run on Amazon RDS (medium MySQL 5.5.x) takes almost 0.094s.

What could be causing this behavior?

Paul White
95.3k30 gold badges439 silver badges689 bronze badges
asked May 4, 2013 at 7:47

1 Answer 1

2

Are you running this test between RDS and MySQL workbench on your own machine?

The MySQL client (and MySQL workbench) are including the time it takes for RDS to return the value of "1" to your workstation (from my workstation on the other side of the world, the response from RDS US West takes 280ms).

If you try enabling profiling on the RDS service, you can see how long the query is really taking - it's completing on your RDS instance in fractions of a millisecond.

mysql> set profiling = 1;
Query OK, 0 rows affected (0.00 sec)
mysql> select 1;
1
1
1 row in set (0.27 sec)
mysql> show profiles;
Query_ID Duration Query
 1 0.00016200 select 1
mysql> show profile for query 1;
Status Duration
starting 0.000052
checking permissions 0.000008
Opening tables 0.000012
...
executing 0.000013
end 0.000008
...
cleaning up 0.000003
12 rows in set (0.28 sec)
set profiling = 0;
Query OK, 0 rows affected (0.28 sec)
answered May 4, 2013 at 11:59

Your Answer

Draft saved
Draft discarded

Sign up or log in

Sign up using Google
Sign up using Email and Password

Post as a guest

Required, but never shown

Post as a guest

Required, but never shown

By clicking "Post Your Answer", you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.