161 Commits

Author SHA1 Message Date
27a4771206 bindinfo: save bindinfo into stmtctx to avoid calling NormalizeStmtForBinding and getbindcache repeatedly (#65484)
close pingcap/tidb#65100
2026-01-13 19:55:08 +00:00
b147abe19f planner: support cluster-level binding reload command (#65509)
close pingcap/tidb#65378
2026-01-13 16:29:32 +00:00
17a245ee00 bindinfo: collect all the matchSQLBinding's time spent (#65445)
ref pingcap/tidb#64375
2026-01-06 15:55:53 +00:00
03bc2507ca planner: track more details about time spent on query optimization (#65096)
close pingcap/tidb#64375
2025-12-29 06:13:11 +00:00
163790b780 planner: simplify TestBatchDropBindings to make it more stable (#65286)
close pingcap/tidb#65227
2025-12-26 12:29:26 +00:00
8bd4694ebb planner: fix unnecessary warnings when setting binding status (#64871)
close pingcap/tidb#64558
2025-12-06 12:41:23 +00:00
dd1df3f81b planner: fix the issue that READ_FROM_STORAGE hint doesn't consider cross-db binding (#64644)
ref pingcap/tidb#64643
2025-11-24 12:45:26 +00:00
637b7aa8a5 planner: fix wrong binding cache status when adding duplicated bindings (#64497)
close pingcap/tidb#64495
2025-11-14 10:09:41 +00:00
e59b6ea1bd planner: tolerate reasonable time lag between different TiDB nodes when updating binding cache (#64289)
close pingcap/tidb#64250
2025-11-07 10:33:15 +00:00
74d7c1eaff planner: skip disabled bindings when matching bindings (#64072)
close pingcap/tidb#64070
2025-10-21 10:54:49 +00:00
d8bf6317aa *: add tidb_enable_binding_usage (#63988)
close pingcap/tidb#63986
2025-10-21 08:36:22 +00:00
70c7d5051c bindinfo: add last_used_date to track bindinfo usage frequency (#63409)
close pingcap/tidb#63407
2025-09-30 07:50:46 +00:00
461db9689d bindinfo: improve diagnostics in binding tests (#63542)
ref pingcap/tidb#63523
2025-09-17 15:26:56 +00:00
365cc25444 bindinfo: use microsecond precision for create/update timestamps (#63524)
ref pingcap/tidb#60148, close pingcap/tidb#63523
2025-09-16 21:29:50 +00:00
tpp
6ba98357b9 planner: Exists subquery to join variable (#63416)
ref pingcap/tidb#44850
2025-09-10 13:18:33 +00:00
d022959e78 planner: keep join keys for join optimization in constant propagation (#63404)
close pingcap/tidb#60076, close pingcap/tidb#63314
2025-09-10 02:07:48 +00:00
ec3ade5dea planner: allow cartesian joins in greedy join order algo to explore better join orders (#63309)
close pingcap/tidb#63290
2025-09-09 15:44:57 +00:00
1f967030a0 fix: drop some dead code phase 1 (#63079)
ref pingcap/tidb#50727
2025-09-05 09:54:33 +00:00
tpp
013cacffeb planner: Add variable for no_decorrelate in select list (#63204)
close pingcap/tidb#51116
2025-09-03 18:34:00 +00:00
tpp
654b7910f9 planner: Add new risk variables to plan generation (#63187)
ref pingcap/tidb#59333
2025-08-27 02:52:21 +00:00
5674b9d695 planner: fix handling of empty plan digests in getBindingPlanInfo (#63189)
ref pingcap/tidb#60148
2025-08-26 13:56:22 +00:00
c7c45c2d0a planner,selectivity: record the default selectivity (#63102)
close pingcap/tidb#55366
2025-08-26 08:42:18 +00:00
5fab436e60 planner: use expoBackoff for GROUP BY cardinality estimation when no … (#62813)
close pingcap/tidb#62756
2025-08-25 21:16:10 +00:00
d82d2baa0f bazel: update settings and close some race on tests (#63009) 2025-08-15 09:07:31 +00:00
c7003d8d65 planner: Implement ignore_plan_cache hint for non-prepared statements. (#62641)
close pingcap/tidb#62634
2025-07-30 05:50:37 +00:00
102ffeccba mdl/sessionmanager: some refactor of MDL loop and move sessionmanager from util to session pkg (#62671)
ref pingcap/tidb#61702
2025-07-29 12:55:28 +00:00
89fccd79d0 planner: remove "SHOW PLAN FOR <SQL>" syntax (#62509)
ref pingcap/tidb#60148
2025-07-25 03:28:58 +00:00
5ae6ad63c2 session: rename and unify location of interfaces, and some refactor (#62498)
ref pingcap/tidb#61702
2025-07-22 07:43:38 +00:00
78f1ba3c1a planner: don't consider an empty plan a simple point plan (#62510)
ref pingcap/tidb#60148
2025-07-21 22:08:53 +00:00
3d7650d9fb planner: remove the test of manually setting cost v2 (#62493) 2025-07-18 06:24:57 +00:00
tpp
2a74539ace planner: extend order ratio to joins (#61687)
close pingcap/tidb#62034
2025-07-01 02:36:18 +00:00
f52d19273b planner: use the current user name when exploring new plans (#62016)
ref pingcap/tidb#60148
2025-06-27 03:20:12 +00:00
tpp
e34335386f planner: log merge fix control for multiple ranges (#61976)
ref pingcap/tidb#60148
2025-06-25 08:08:48 +00:00
f28a1e2a13 planner: support explain [analyze] <plan_digest> for explain explore (#61942)
ref pingcap/tidb#60148
2025-06-24 02:54:15 +00:00
52ca7d49b4 planner: record explored plans into tidb_statement_stats when running explain explore (#61850)
ref pingcap/tidb#60148
2025-06-23 18:27:06 +00:00
f350b69798 planner: support "explain explore analyze" when exploring new plans offline (#61778)
ref pingcap/tidb#60148
2025-06-18 02:32:33 +00:00
9e35ae6265 planner: consider leading hints (join order) when exploring plans (#61279)
ref pingcap/tidb#60148
2025-05-24 05:24:37 +00:00
c85f3338e2 planner: consider PreferRange when exploring new plans (#61251)
ref pingcap/tidb#60148
2025-05-22 02:21:10 +00:00
815130fc9e planner: merge the some code of helper func genPlanWithSCtx with Explain to reduce redundant code (#61224)
ref pingcap/tidb#60148
2025-05-21 00:35:34 +00:00
tpp
6b11bda599 planner: Update default for index selectivity ratio (#61097)
close pingcap/tidb#39187
2025-05-20 20:04:37 +00:00
07f4eda040 planner: explore new plans via adjusting optimizer variables when "EXPLAIN EXPLORE" (#61190)
ref pingcap/tidb#60148
2025-05-20 10:23:10 +00:00
8ecc397d9c planner: a new helper function GenPlanWithSCtx for SPM (#61153)
ref pingcap/tidb#60148
2025-05-19 19:20:55 +00:00
dfc4eee0b4 planner: a new function to get all relevant optimizer variables related to a certain SQL for SPM (#61119)
ref pingcap/tidb#60148
2025-05-15 18:36:20 +00:00
617661007e planner: use "EXPLAIN EXPLORE" to replace "SHOW PLAN" (#61099)
ref pingcap/tidb#60148
2025-05-15 04:09:05 +00:00
tpp
61e061e08c planner: selectivity estimate not to go below 1 (#61045)
ref pingcap/tidb#47400
2025-05-13 01:42:12 +00:00
21f318d9c4 planner: add skeleton of SPM AI Plan Evolution (#60824)
ref pingcap/tidb#60148
2025-04-25 19:52:12 +00:00
183253803b bindinfo: gopls modernize (#60783)
close pingcap/tidb#60782
2025-04-24 04:59:04 +00:00
6dc5817547 util: fix typo in DestroyParser function name (#60494)
close pingcap/tidb#60493
2025-04-11 03:53:16 +00:00
84c3948930 planner: recommend optimal plans in SHOW PLAN statement (#60366)
ref pingcap/tidb#60148
2025-04-06 03:57:52 +00:00
2347e977a2 planner: add an unique key into mysql.bind_info (#60296)
ref pingcap/tidb#60148
2025-04-02 09:09:06 +00:00