MySQL HeatWave User Guide
The task_list routine returns a paginated
list of asynchronous tasks.
The application-level variant for this routine is
app_task_list.
This topic contains the following sections:
mysql> SELECT mysql_tasks.task_list(
IN 'task_type' VARCHAR(80),
IN offset INT UNSIGNED,
IN limit INT UNSIGNED);
Following are task_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): the number of
rows to skip. The offset value is used for pagination.
If the value is NULL, the offset
defaults to 0, and the result is
displayed starting from the first row.
limit (INT UNSIGNED): the maximum
number of task records included in the list of tasks. If
the value is NULL, the limit defaults
to 20, and up to 20 rows are displayed.
mysql> JSON_PRETTY(mysql_tasks.task_list('Async_SQL', 2, 2));The output is similar to the following:
| [
{
"id": "4605cf38-527b-11f0-bca4-020017205654",
"data": {
"mysqlMetadata": {
"autoGc": true,
"events": [
"`demo_db`.`4605c15a-527b-11f0-bca4-020017205654`"
]
}
},
"name": "DemoAsyncTask",
"task_type": "Async_SQL",
"connection_id": 63582
},
{
"id": "18398c40-527b-11f0-bca4-020017205654",
"data": {
"mysqlMetadata": {
"autoGc": true,
"events": [
"`demo_db`.`18397be6-527b-11f0-bca4-020017205654`"
]
}
},
"name": "DemoAsyncTask",
"task_type": "Async_SQL",
"connection_id": 63576
}
] |
This example lists two tasks of type
Async_SQL.