xinghuayu007 opened a new issue #4681:
URL: https://github.com/apache/incubator-doris/issues/4681
**Is your feature request related to a problem? Please describe.**
Sometimes, a sql causes all BE core dump and the system is unavailable for
a long time. We want to know which sqls are running, which one may cause the
core dump and kill the running sql urgently to recover the system. For the
quality of service, it is a necessity for a feature to show the running sqls.
At the same time, we also want to know the load of the system roughly by
getting the running sqls.
Although we can set the timeout time in case of long time unavailable, it
is also needed to kill the sql manually for some bad case.
**Describe the solution you'd like**
Our solution is referenced to ClickHouse:
https://clickhouse.tech/docs/en/sql-reference/statements/show/
There are two kinds of sql, synchronous and asynchronous. For synchronous
sql, it is saved in memory when FE received the request, and remove it from
memory when it finished. For asynchronous sql, it is saved in memory and get
the information and status from "job queue".
query id, user, start time, sql, are needed to show the running sql.
The grammar is like this:
`show processlist`
the query returns:
-------------+------+----------------------------+-------------------------
|query_id | user | start_time | stmt
|
--------------+------+--------------------------+---------------------------
|sserw23 | admin | 2020-09-28 11:32:12 | select * from table1|
Firstly, synchronous sql will be supported like select query,
Then, asynchronous sql will be supported.
In the future, kill sql operation will be supported like:
`kill sql where query_id='123456789'`
**Describe alternatives you've considered**
A clear and concise description of any alternative solutions or features
you've considered.
**Additional context**
Add any other context or screenshots about the feature request here.
----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
For queries about this service, please contact Infrastructure at:
[email protected]
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]