Once cached, the query returns in 0s.
10.0.25
MariaDB [opperf]> show variables like '%version%';
+-------------------------+------------------+
| Variable_name | Value |
+-------------------------+------------------+
| innodb_version | 5.6.29-76.2 |
| protocol_version | 10 |
| slave_type_conversions | |
| tokudb_version | 5.6.26-74.0 |
| version | 10.0.25-MariaDB |
| version_comment | MariaDB Server |
| version_compile_machine | x86_64 |
| version_compile_os | Linux |
| version_malloc_library | bundled jemalloc |
+-------------------------+------------------+
9 rows in set (0.09 sec)
+------+-------------+------------------+-------+----------------------------+--------------------+---------+------+-------+----------------------------------------------+
| id | select_type | table | type | possible_keys | key | key_len | ref | rows | Extra |
+------+-------------+------------------+-------+----------------------------+--------------------+---------+------+-------+----------------------------------------------+
| 1 | SIMPLE | service_perf_651 | range | PRIMARY,service_perf_1_idx | service_perf_1_idx | 16 | NULL | 17880 | Using where; Using temporary; Using filesort |
+------+-------------+------------------+-------+----------------------------+--------------------+---------+------+-------+----------------------------------------------+
10.0.31
MariaDB [opperf]> show variables like '%version%';
+-------------------------+------------------+
| Variable_name | Value |
+-------------------------+------------------+
| innodb_version | 5.6.36-82.0 |
| protocol_version | 10 |
| slave_type_conversions | |
| tokudb_version | 5.6.36-82.0 |
| version | 10.0.31-MariaDB |
| version_comment | MariaDB Server |
| version_compile_machine | x86_64 |
| version_compile_os | Linux |
| version_malloc_library | bundled jemalloc |
+-------------------------+------------------+
9 rows in set (0.11 sec)
+------+-------------+------------------+-------+----------------------------+---------+---------+------+------+----------------------------------------------+
| id | select_type | table | type | possible_keys | key | key_len | ref | rows | Extra |
+------+-------------+------------------+-------+----------------------------+---------+---------+------+------+----------------------------------------------+
| 1 | SIMPLE | service_perf_651 | range | PRIMARY,service_perf_1_idx | PRIMARY | 16 | NULL | 1 | Using where; Using temporary; Using filesort |
+------+-------------+------------------+-------+----------------------------+---------+---------+------+------+----------------------------------------------+
tks.