sql - 如何在 TDengine 上查看查询状态?
问题描述
我正在使用 TDengine 部署多个节点的集群。在我创建了 ~10000 个表并尝试在我的一台主机上执行如下所示的复杂 sql 之后,查询完成需要相当长的时间。我想知道当当前外壳挂起时,是否有办法检查来自另一台主机的查询(即从哪个主机发送的查询等)的状态。
taos> select count(*),first(ts),last(ts), sum(current) from meters interval(100a) group by tbname;
ts | count(*) | first(ts) | last(ts) | sum(current) | tbname |
===================================================================================================================================================================
2017-07-14 10:40:00.000 | 100 | 2017-07-14 10:40:00.000 | 2017-07-14 10:40:00.099 | 996.587355614 | d0 |
2017-07-14 10:40:00.100 | 100 | 2017-07-14 10:40:00.100 | 2017-07-14 10:40:00.199 | 997.835609436 | d0 |
2017-07-14 10:40:00.200 | 100 | 2017-07-14 10:40:00.200 | 2017-07-14 10:40:00.299 | 998.551523209 | d0 |
2017-07-14 10:40:00.300 | 100 | 2017-07-14 10:40:00.300 | 2017-07-14 10:40:00.399 | 999.269976616 | d0 |
2017-07-14 10:40:00.400 | 100 | 2017-07-14 10:40:00.400 | 2017-07-14 10:40:00.499 | 999.230366707 | d0 |
2017-07-14 10:40:00.500 | 100 | 2017-07-14 10:40:00.500 | 2017-07-14 10:40:00.599 | 996.629768372 | d0 |
2017-07-14 10:40:00.600 | 100 | 2017-07-14 10:40:00.600 | 2017-07-14 10:40:00.699 | 996.427525520 | d0 |
2017-07-14 10:40:00.700 | 100 | 2017-07-14 10:40:00.700 | 2017-07-14 10:40:00.799 | 997.461921692 | d0 |
2017-07-14 10:40:00.800 | 100 | 2017-07-14 10:40:00.800 | 2017-07-14 10:40:00.899 | 997.587766647 | d0 |
2017-07-14 10:40:00.900 | 100 | 2017-07-14 10:40:00.900 | 2017-07-14 10:40:00.999 | 998.667234421 | d0 |
2017-07-14 10:40:01.000 | 100 | 2017-07-14 10:40:01.000 | 2017-07-14 10:40:01.099 | 997.393896103 | d0 |
....
100 | 2017-07-14 10:40:09.200 | 2017-07-14 10:40:09.299 | 998.651506424 | d0 |
2017-07-14 10:40:09.300 | 100 | 2017-07-14 10:40:09.300 | 2017-07-14 10:40:09.399 | 996.747236252 | d0 |
2017-07-14 10:40:09.400 | 100 | 2017-07-14 10:40:09.400 | 2017-07-14 10:40:09.499 | 999.305024147 | d0 |
2017-07-14 10:40:09.500 | 100 | 2017-07-14 10:40:09.500 | 2017-07-14 10:40:09.599 | 997.183553696 | d0 |
2017-07-14 10:40:09.600 | 100 | 2017-07-14 10:40:09.600 | 2017-07-14 10:40:09.699 | 999.539278984 | d0 |
2017-07-14 10:40:09.700 | 100 | 2017-07-14 10:40:09.700 | 2017-07-14 10:40:09.799 | 998.831772804 | d0 |
2017-07-14 10:40:09.800 | 100 | 2017-07-14 10:40:09.800 | 2017-07-14 10:40:09.899 | 995.791324615 | d0 |
2017-07-14 10:40:09.900 | 100 | 2017-07-14 10:40:09.900 | 2017-07-14 10:40:09.999 | 997.620196342 | d0 |
[100 Rows showed, and more rows are fetching but will not be showed. You can ctrl+c to stop or wait.]
[You can add limit statement to show more or redirect results to specific file to get all.]
Query OK, 1000000 row(s) in set (32.192185s)
解决方案
您可以使用 SQL 命令“SHOW QUERIES;”来查找更多信息。
推荐阅读
- apache - 但是对于许多参数,例如 apache isis 中的姓名、姓氏、出生日期等(仅类参数),您如何做同样的事情?
- rest - 如何为 RAD 服务器身份验证调用配置 TRESTRequest?
- python - 用在字典列表中找到的名称替换字典中的键 PYTHON-FLASK
- python - 如何检查 Kivy UrlRequest Get 是否在 Android 上运行?
- c# - IQueryable/IEnumerable 应用用法:使用 Azure CosmosDB 针对数据库的数据库查询请求
- vue.js - 通过单击 vuetify 项目中的另一个按钮触发按钮单击?
- java - 应用程序在测试 ir 时不断崩溃并且无法运行
- javascript - Babel 不包括 IE 11 的相关 polyfill
- bash - 在不关闭 MacOS 的情况下重启终端
- unity3d - 将 Unity 预制件/场景反序列化为键/值对的嵌套哈希表