Scheduled SQL

Updated at:

This topic describes the limits of Scheduled SQL.

Special tasks

Simple Log Service (SLS) features such as Trace and Cloud Lens for SLB depend on Scheduled SQL. To keep these features running correctly, Scheduled SQL prevents you from updating, copying, or deleting their tasks in the Scheduled SQL task management interface. To manage these tasks, use the interface of each feature instead.

Query and analysis

Important

Scheduled SQL supports only the Dedicated SQL engine.

Limit

Description

Concurrency

A single project supports up to 100 concurrent analysis operations.

For example, 100 users can run analysis operations at the same time on different Logstores in the same project.

Data volume

A single analysis operation can scan up to 200 billion rows of data.

Data activation process

The analysis feature processes only data written after you enable the statistics feature.

To analyze historical data, reindex the data. For more information, see Reindex.

Return values

  • By default, an analysis operation returns up to 100 rows. Excess rows are not returned.

  • To return more data, use the LIMIT clause. You can return up to 1 million rows. For more information, see LIMIT clause. Excess rows are not returned.

  • The maximum data output is 20 GB. Excess data is not returned.

Field value size

The default size of a single field value is 2,048 bytes (2 KB), and the maximum is 16,384 bytes (16 KB). Values that exceed the maximum size are excluded from the analysis.

You can change the maximum length of a field value to a value from 64 bytes to 16,384 bytes when you configure an index. For more information, see Create an index.

Timeout

The maximum timeout for an analysis operation is 10 minutes.

Number of bits for Double-type field values

A Double-type field value has a precision of up to 52 bits.

Precision loss occurs if a floating-point number is encoded with more than 52 bits.

Fuzzy query

When you run a fuzzy query, SLS matches up to 100 terms and returns all logs that contain these terms and meet the query conditions.

Inaccurate results

Inaccurate results do not cause errors. They are recorded in the instance status and task execution records. You must manually enable task execution records.

Data latency

Data latency can cause missed data during queries. For example, if data for a specific time point arrives after the corresponding scheduled instance finishes, the data is not processed by the next scheduled instance. For more information, see How to ensure the accuracy of SQL analysis.

Time window

The maximum time window for a single query is 24 hours, and the minimum is 1 minute.

Metastore association

Not supported.

LIMIT clause

In Scheduled SQL, only the LIMIT x format is supported. The LIMIT y, x format is not supported.

Data writes

Limit

Description

Destination Logstore write threshold

If the write threshold is exceeded, the Scheduled SQL task retries for more than 10 minutes. If the task still fails after retries, an error is returned. For more information, see Data reads and writes.

Warning

Do not configure the destination store as the current source store (same-source configuration). Otherwise, logs may be written in a loop, which incurs additional storage and traffic costs. You are responsible for the resource consumption and costs incurred.

Cross-region transfer

Transferring data across regions within mainland China uses a relatively stable network, but high latency may occur. The latency varies by region.

The stability of international networks is not guaranteed.

Task execution

Limit

Description

Timeout

The maximum timeout is 1,800 seconds. If a task execution exceeds this limit, the execution is considered failed.

Add an alerting monitoring job to promptly detect issues and retry failed instances. For more information, see Set alerts for a Scheduled SQL task and Retry a Scheduled SQL task instance.

Number of retries

The maximum number of retries is 100. If this limit is exceeded, the execution is considered failed.

Delayed execution

The maximum delayed execution time is 120 seconds. For examples of delayed execution scenarios, see Scheduling and execution scenarios.

Historical execution records

Historical execution records for a single task are retained for up to 5 days.

Add an alerting monitoring job to promptly detect issues and retry failed instances. For more information, see Set alerts for a Scheduled SQL task and Retry a Scheduled SQL task instance.