You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The slow_query view uses the date field as a where condition, where the position of time is different (but equivalent), and the dates in the execution plan are different
#57547
Open
eastsunmoon opened this issue
Nov 20, 2024
· 0 comments
· May be fixed by #57562
Please answer these questions before submitting your issue. Thanks!
1. Minimal reproduce step (Required)
use information_schema;
mysql> explain select count(*) from slow_query where '2024-11-20 12:41:45' < time ;
+----------------------+----------+------+------------------+----------------------------------------------------------------------------+
| id | estRows | task | access object | operator info |
+----------------------+----------+------+------------------+----------------------------------------------------------------------------+
| HashAgg_6 | 1.00 | root | | funcs:count(1)->Column#80 |
| └─MemTableScan_8 | 10000.00 | root | table:SLOW_QUERY | start_time:2024-11-19 12:41:44.999000, end_time:2024-11-20 12:41:44.999000 |
+----------------------+----------+------+------------------+----------------------------------------------------------------------------+
2 rows in set (0.00 sec)
mysql> explain select count(*) from slow_query where time > '2024-11-20 12:41:45' ;
+----------------------+----------+------+------------------+----------------------------------------------------------------------------+
| id | estRows | task | access object | operator info |
+----------------------+----------+------+------------------+----------------------------------------------------------------------------+
| HashAgg_6 | 1.00 | root | | funcs:count(1)->Column#80 |
| └─MemTableScan_8 | 10000.00 | root | table:SLOW_QUERY | start_time:2024-11-20 12:41:45.001000, end_time:2024-11-21 12:41:45.001000 |
+----------------------+----------+------+------------------+----------------------------------------------------------------------------+
2 rows in set (0.00 sec)
2. What did you expect to see? (Required)
the dates in the execution plan are same.
3. What did you see instead (Required)
The slow_query view uses the date field as a where condition, where the position of time is different (but equivalent), and the dates in the execution plan are different
4. What is your TiDB version? (Required)
mysql> select version();
+--------------------+
| version() |
+--------------------+
| 8.0.11-TiDB-v7.5.2 |
+--------------------+
1 row in set (0.00 sec)
The text was updated successfully, but these errors were encountered:
Bug Report
Please answer these questions before submitting your issue. Thanks!
1. Minimal reproduce step (Required)
use information_schema;
mysql> explain select count(*) from slow_query where '2024-11-20 12:41:45' < time ;
+----------------------+----------+------+------------------+----------------------------------------------------------------------------+
| id | estRows | task | access object | operator info |
+----------------------+----------+------+------------------+----------------------------------------------------------------------------+
| HashAgg_6 | 1.00 | root | | funcs:count(1)->Column#80 |
| └─MemTableScan_8 | 10000.00 | root | table:SLOW_QUERY | start_time:2024-11-19 12:41:44.999000, end_time:2024-11-20 12:41:44.999000 |
+----------------------+----------+------+------------------+----------------------------------------------------------------------------+
2 rows in set (0.00 sec)
mysql> explain select count(*) from slow_query where time > '2024-11-20 12:41:45' ;
+----------------------+----------+------+------------------+----------------------------------------------------------------------------+
| id | estRows | task | access object | operator info |
+----------------------+----------+------+------------------+----------------------------------------------------------------------------+
| HashAgg_6 | 1.00 | root | | funcs:count(1)->Column#80 |
| └─MemTableScan_8 | 10000.00 | root | table:SLOW_QUERY | start_time:2024-11-20 12:41:45.001000, end_time:2024-11-21 12:41:45.001000 |
+----------------------+----------+------+------------------+----------------------------------------------------------------------------+
2 rows in set (0.00 sec)
2. What did you expect to see? (Required)
the dates in the execution plan are same.
3. What did you see instead (Required)
The slow_query view uses the date field as a where condition, where the position of time is different (but equivalent), and the dates in the execution plan are different
4. What is your TiDB version? (Required)
mysql> select version();
+--------------------+
| version() |
+--------------------+
| 8.0.11-TiDB-v7.5.2 |
+--------------------+
1 row in set (0.00 sec)
The text was updated successfully, but these errors were encountered: