SHOW QUERIES
SHOW QUERIES
SHOW QUERIES
returns information about all the queries running now. It outputs a table with the following structure:
id
: query id which can be used in KILL to terminate the queryquery
: query statement or a part of itprotocol
: connection protocol, the possible values aresphinx
,mysql
,http
,ssl
,compressed
andreplication
or combination (e.g.http,ssl
orcompressed,mysql
)host
:ip:port
of the client
- SQL
SQL
mysql> SHOW QUERIES;
Response
+------+--------------+----------+-----------------+
| id | query | protocol | host |
+--------------------------+-----------------------+
| 6 | select | http | 127.0.0.1:41128 |
| 4 | show queries | mysql | 127.0.0.1:56672 |
+------+--------------+----------+-----------------+
2 rows in set (0.61 sec)
See also SHOW THREADS if you want to know what’s going on from the threads angle of view.
KILL
KILL <query id>
KILL
terminates execution of a query by its id which you can find in SHOW QUERIES.
- SQL
SQL
mysql> KILL 4;
Query OK, 1 row affected (0.00 sec)
SHOW WARNINGS
SHOW WARNINGS
statement can be used to retrieve the warning produced by the latest query. The error message will be returned along with the query itself:
mysql> SELECT * FROM test1 WHERE MATCH('@@title hello') \G
ERROR 1064 (42000): index test1: syntax error, unexpected TOK_FIELDLIMIT
near '@title hello'
mysql> SELECT * FROM test1 WHERE MATCH('@title -hello') \G
ERROR 1064 (42000): index test1: query is non-computable (single NOT operator)
mysql> SELECT * FROM test1 WHERE MATCH('"test doc"/3') \G
*************************** 1\. row ***************************
id: 4
weight: 2500
group_id: 2
date_added: 1231721236
1 row in set, 1 warning (0.00 sec)
mysql> SHOW WARNINGS \G
*************************** 1\. row ***************************
Level: warning
Code: 1000
Message: quorum threshold too high (words=2, thresh=3); replacing quorum operator
with AND operator
1 row in set (0.00 sec)
当前内容版权归 manticoresoftware 或其关联方所有,如需对内容或内容相关联开源项目进行关注与资助,请访问 manticoresoftware .