Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

planner: tidb_enable_new_only_full_group_by_check cause plan-cache hit ratio regression on sysbench #45519

Open
qw4990 opened this issue Jul 24, 2023 · 0 comments
Assignees
Labels

Comments

@qw4990
Copy link
Contributor

qw4990 commented Jul 24, 2023

Enhancement

After enabling tidb_enable_new_only_full_group_by_check, the query below cannot hit the plan-cache:

CREATE TABLE `sbtest1` (
  `id` int(11) NOT NULL, `k` int(11) NOT NULL DEFAULT '0',
  `c` char(120) NOT NULL DEFAULT '', `pad` char(60) NOT NULL DEFAULT '',
  PRIMARY KEY (`id`) /*T![clustered_index] CLUSTERED */, KEY `k_1` (`k`));

mysql> set tidb_enable_new_only_full_group_by_check=on;
Query OK, 0 rows affected (0.00 sec)

mysql> prepare st from 'select c from sbtest1 where id between ? and ?';
Query OK, 0 rows affected (0.00 sec)

mysql> set @a=1, @b=4;
Query OK, 0 rows affected (0.00 sec)

mysql> execute st using @a, @b;
Empty set, 1 warning (0.00 sec)

mysql> show warnings;
+---------+------+-------------------------------------------------+
| Level   | Code | Message                                         |
+---------+------+-------------------------------------------------+
| Warning | 1105 | skip prepared plan-cache: %v affects null check |
+---------+------+-------------------------------------------------+
1 row in set (0.00 sec)
@qw4990 qw4990 added type/enhancement The issue or PR belongs to an enhancement. sig/planner SIG: Planner epic/plan-cache labels Jul 24, 2023
@qw4990 qw4990 self-assigned this Jul 24, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants