为提高效率,提问时请提供以下信息,问题描述清晰可优先响应。
- 【TiDB 版本】:Release Version: v3.0.5
- 【问题描述】:
背景:
sql: select A,B,C in tA | tB | tC where D in (*, *); // 执行计划正确,走索引,qps较大
tikv配置: 10 * tikv (88C/376G/SAS)
Wait_time
mysql> select min(Wait_time), max(Wait_time), avg(Wait_time) from slow_query where Digest = "1b0480cb65be87b2463a9af8c3f4ab38da4033d44e8f748b7847ff6a325ce862";
+----------------+----------------+--------------------+
| min(Wait_time) | max(Wait_time) | avg(Wait_time) |
+----------------+----------------+--------------------+
| 0 | 6.642 | 0.5151469038777117 |
+----------------+----------------+--------------------+
1 row in set (3.15 sec)
mysql> select min(Wait_time), max(Wait_time), avg(Wait_time) from slow_query where Digest = "4bd29d3d18cf0b2036c52e2207d8877fad52505e33a0fe5ba3c113f700a99bc8";
+----------------+----------------+--------------------+
| min(Wait_time) | max(Wait_time) | avg(Wait_time) |
+----------------+----------------+--------------------+
| 0 | 8.18 | 0.7333185026737967 |
+----------------+----------------+--------------------+
1 row in set (4.07 sec)
mysql> select min(Wait_time), max(Wait_time), avg(Wait_time) from slow_query where Digest = "bba5f9b6556eb288e54e15dae012909fda00ef226d00a3c5577a8dfeca3f1ac8";
+----------------+----------------+--------------------+
| min(Wait_time) | max(Wait_time) | avg(Wait_time) |
+----------------+----------------+--------------------+
| 0 | 14.305 | 0.7351434404013673 |
+----------------+----------------+--------------------+
1 row in set (3.38 sec)
问题:
怎么可以降低该sql的查询时间,提升性能?
若提问为性能优化、故障排查类问题,请下载脚本运行。终端输出打印结果,请务必全选并复制粘贴上传。