HeatWave User Guide  /  ...  /  task_status_list

10.1.4.14 task_status_list

The task_status_list routine returns a paginated list of task statuses.

The application-level variant for this routine is app_task_status_list.

This topic contains the following sections:

Syntax
Press CTRL+C to copy
mysql> SELECT mysql_tasks.task_status_list( IN 'task_type' VARCHAR(80), IN offset INT UNSIGNED, IN limit INT UNSIGNGED);

Following are task_status_list parameters:

  • task_type (VARCHAR(80)): filters the tasks based on a specific task type. If the value is NULL, tasks of all types are included. Task type for tasks created using the execute_prepared_stmt_async procedure is Async_SQL. For asynchronous VECTOR_STORE_LOAD tasks, the task type is GenAI_Load.

  • offset (INT UNSIGNED): specifies the initial number of rows to skip. The offset value is used for pagination.

  • limit (INT UNSIGNED): specifies the maximum number of task records to include.

Syntax Example
Press CTRL+C to copy
mysql> SELECT JSON_PRETTY(mysql_tasks.task_status_list('Async_SQL', 0, 1));

The output is similar to the following:

Press CTRL+C to copy
| [ { "id": "17efb56b-52a1-11f0-bca4-020017205654", "data": { "Async Task completed at": "2025-06-26 15:20:34.000000" }, "name": "DemoAsyncTask", "alias": "Thu-7", "status": "COMPLETED", "message": "Execution finished.", "progress": 100, "row_hash": "fa701b650afd8638049f8fd436a500f5", "task_data": { "mysqlMetadata": { "autoGc": true, "events": [ "`demo_db`.`17ef9cf8-52a1-11f0-bca4-020017205654`" ] } }, "task_type": "Async_SQL", "server_uuid": "5172a252-8a06-11ef-b3bb-02001727ecef", "progress_bar": "##########", "starting_time": "2025-06-26 15:20:29.000000", "scheduled_time": "2025-06-26 15:20:29.000000", "estimated_remaining_time": 0.00000, "estimated_completion_time": "2025-06-26 15:20:34.000000" } ] |

This example returns task status information one asynchronous task with task type Async_SQL.