Данные похожи на двух серверах.
Сервер A:
mysql> SHOW VARIABLES LIKE "%version%";
+-------------------------+-------------------------+
| Variable_name | Value |
+-------------------------+-------------------------+
| innodb_version | 5.7.26 |
| protocol_version | 10 |
| slave_type_conversions | |
| tls_version | TLSv1,TLSv1.1 |
| version | 5.7.26-0ubuntu0.16.04.1 |
| version_comment | (Ubuntu) |
| version_compile_machine | x86_64 |
| version_compile_os | Linux |
+-------------------------+-------------------------+
Сервер B
MariaDB> SHOW VARIABLES LIKE "%version%";
+-------------------------+--------------------------+
| Variable_name | Value |
+-------------------------+--------------------------+
| innodb_version | 5.6.42-84.2 |
| protocol_version | 10 |
| slave_type_conversions | |
| version | 10.1.38-MariaDB-0+deb9u1 |
| version_comment | Debian 9.8 |
| version_compile_machine | x86_64 |
| version_compile_os | debian-linux-gnu |
| version_malloc_library | system jemalloc |
| version_ssl_library | YaSSL 2.4.4 |
| wsrep_patch_version | wsrep_25.24 |
+-------------------------+--------------------------+
Когда я делаю EXPLAIN для запроса, результатыРазные:
Server A return
+----+-------------+-------+------------+--------+----------------------+----------+---------+--------------------+------+----------+-----------------+
| id | select_type | table | partitions | type | possible_keys | key | key_len | ref | rows | filtered | Extra |
+----+-------------+-------+------------+--------+----------------------+----------+---------+--------------------+------+----------+-----------------+
| 1 | SIMPLE | f1_ | NULL | index | IDX_90291C2D2D710CF2 | date_idx | 5 | NULL | 40 | 100.00 | Using temporary |
| 1 | SIMPLE | u0_ | NULL | eq_ref | PRIMARY,closed_idx | PRIMARY | 4 | smailsf.f1_.poster | 1 | 50.00 | Using where |
+----+-------------+-------+------------+--------+----------------------+----------+---------+--------------------+------+----------+-----------------+
Server B return
+------+-------------+-------+--------+----------------------+---------+---------+------------------+--------+---------------------------------+
| id | select_type | table | type | possible_keys | key | key_len | ref | rows | Extra |
+------+-------------+-------+--------+----------------------+---------+---------+------------------+--------+---------------------------------+
| 1 | SIMPLE | f1_ | ALL | IDX_90291C2D2D710CF2 | NULL | NULL | NULL | 657064 | Using temporary; Using filesort |
| 1 | SIMPLE | u0_ | eq_ref | PRIMARY,closed_idx | PRIMARY | 4 | smail.f1_.poster | 1 | Using where |
+------+-------------+-------+--------+----------------------+---------+---------+------------------+--------+---------------------------------+
Почему для одного и того же запроса на сервере A число строк равно 40, а на сервере B число строк равно 657064?
Это, как Мария, не имеет значенияиндексы или кеш?
Какие параметры конфигурации могут повлиять на это поведение?
Спасибо,