Details
-
Bug
-
Status: Confirmed (View Workflow)
-
Major
-
Resolution: Unresolved
-
10.0.26, 10.1.18
-
None
Description
MariaDB [RHE_MANAGER]> explain SELECT MAX(`CT_ID`) FROM `CONTRATS`; |
+------+-------------+-------+------+---------------+------+---------+------+------+------------------------------+ |
| id | select_type | table | type | possible_keys | key | key_len | ref | rows | Extra | |
+------+-------------+-------+------+---------------+------+---------+------+------+------------------------------+ |
| 1 | SIMPLE | NULL | NULL | NULL | NULL | NULL | NULL | NULL | Select tables optimized away | |
+------+-------------+-------+------+---------------+------+---------+------+------+------------------------------+ |
1 row in set (0.00 sec) |
 |
|
explain SELECT @max:=MAX(`CT_ID`) FROM `CONTRATS`; |
+------+-------------+----------+-------+---------------+--------------+---------+------+---------+-------------+ |
| id | select_type | table | type | possible_keys | key | key_len | ref | rows | Extra | |
+------+-------------+----------+-------+---------------+--------------+---------+------+---------+-------------+ |
| 1 | SIMPLE | CONTRATS | index | NULL | CT_EXPORTRHI | 2 | NULL | 2679710 | Using index | |
+------+-------------+----------+-------+---------------+--------------+---------+------+---------+-------------+ |