Statements in the SQL window of OceanBase Developer Center (ODC) are executed synchronously. Therefore, the execution may time out when the statement runs for a long time. You can use the asynchronous execution tool to run time-consuming SQL statements to avoid execution timeout.
To use the asynchronous execution tool to execute SQL statements, perform the following steps:
Enter the Asynchronous Execution panel.
Log on to ODC and click the name of the target connection to go to the corresponding database object management page. Click Tool in the navigation bar in the upper part of the page and select Asynchronous Execution from the drop-down list. The Create Async Task panel appears.
Specify Task Name .
Specify the task name in the Task Name field in the panel. The task name must be unique and cannot exceed 110 characters in length.
Specify SQL Content .
The asynchronous execution tool provides two ways to specify SQL content: * SQL Entry : This is the default way to specify SQL content. You can directly write the SQL script in the editing area.
Note
You can click IN Value Conversion to convert the batch copied data into the in('A','B') format. * Column values are separated with line breaks.
Row values are separated with spaces or tabs.
Upload File : Click the file pool to go to the file explorer and select the file to be imported. You can also directly drag the file to the file pool to upload it. The file size cannot exceed 20 MB and only SQL files suffixed with .sql are supported.
Delimiter : The delimiters are supported.
Query Result Limit : You can set the number of data rows in the query result. Value range: 1 to 1 million.
Specify Task Error Handling Method .
The asynchronous execution tool provides two methods to handle task errors: * Abort Task : This is the default option. When you select this option, the task is aborted if an error occurs when you run the script.
- Ignore Error and Continue : When you select this option, the system skips the statement where an error occurs and continues to execute other statements in the script.
Specify Execution Timeout Value .
Specify the value in the Execution Timeout Value field in hours. Default value: 48. Maximum value: 480.
Optional. Specify Task Description .
You can enter a description of no more than 200 characters in Task Description .
Create the asynchronous task.
After you specify the above information in the panel, click Create to submit the information to create the asynchronous execution task.
After the task is created, the Asynchronous Execution page of the Task Center automatically appears. You can click View to go to the task details page, which displays Task Information and Task Log .