Note:
This topic has been translated from a Chinese forum by GPT and might contain errors.Original topic: 我能针对一个慢sql做限制时间?
|
username: tidb狂热爱好者
I have a question. Can I set a time limit for a slow SQL query? But the SQL query seen on the dashboard looks like this: SELECT COUNT(*) AS total FROM co_order WHERE ( uid = ? AND STATUS IN (?, ?, ?, ?) ) [arguments: (501, 0, 1, 3, 5)] How can I limit the execution time for such SQL queries with different user_ids but the same other parameters? 【TiDB Environment】Production, Testing, Research 【TiDB Version】 【Encountered Problem】 【Reproduction Path】`What operations were performed that led to 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.