After enabling tidb_capture_plan_baselines, encountering erroneous bindings and wanting to delete all bindings at once, not sure how to write it

Note:
This topic has been translated from a Chinese forum by GPT and might contain errors.

Original topic: tidb_capture_plan_baselines 开启后遇到错误的绑定想一次性删除所有的绑定不知道怎么写

| username: tidb狂热爱好者

By setting the value of tidb_capture_plan_baselines to on (its default value is off), you can enable the automatic capture binding feature.
Many erroneous bindings have appeared.
At this point, you need to delete the erroneous bindings. Please help to see how to execute this.

[TiDB Usage Environment] Production, Testing, Research
[TiDB Version]
[Encountered Problem]
[Reproduction Path] What operations were performed to encounter the problem
[Problem Phenomenon and Impact]

[Attachments]

Please provide the version information of each component, such as cdc/tikv, which can be obtained by executing cdc version/tikv-server --version.

| username: forever | Original post link

Execute the generated statements in batches to delete them;
You can also add the Source field to distinguish the source of the binding, confirming whether it was generated through capture or manually created.

| username: tidb狂热爱好者 | Original post link

Thank you for your answer.

| username: tidb狂热爱好者 | Original post link

The indexes of these two tables are obviously different, the wrong index was used.

| username: system | Original post link

This topic was automatically closed 1 minute after the last reply. No new replies are allowed.