MaxCompute Lightning provides the system view stv_recents. You can use stv_recents to view all the query jobs that are running.

View all running query jobs

You can run a command to query the information of all running query jobs. The information includes the job ID, username, SQL statement, start time, duration, and resource waiting status. t indicates that the job is waiting for resources and is not executed. f indicates that the resources have been obtained and the job is being executed.

Run the following command:
select * from stv_recents;
The following figure shows an example of the query result.

Cancel a running query job

You can run the following command to cancel a running query job:
select cancel('query_id');
Replace query_id in the command with the value of query_id that is obtained by using stv_recents.