Dedicated SQL is a billable feature that is provided by Log Service to analyze SQL statements. Compared with the Standard SQL feature, which you can use for free, the Dedicated SQL feature has no limits on the number of concurrent operations or the amount of data.

Background information

If you use the Standard SQL feature to analyze a large amount of log data that is generated over a specific time range, Log Service cannot scan all log data in a single query. To ensure timeliness, Log Service limits the amount of data that is scanned in each shard and returns some inaccurate results. In this case, we recommend that you increase the number of shards to increase computing resources. However, after you increase the number of shards, only new data can be written to the shards. Historical data cannot be written to the shards. In addition, the number of consumers also increases.

To resolve this issue, Log Service provides the Dedicated SQL feature. The Dedicated SQL feature can efficiently analyze SQL statements and is not subject to the resource limits that compromise the performance of the Standard SQL feature. For more information, see Limits.
Note
  • The Dedicated SQL feature is in the public preview stage and is available only in China (Chengdu) and China (Heyuan). If you do not reside in the preceding regions and you want to use the Dedicated SQL feature, you can submit a ticket.
  • You can use the Dedicated SQL feature for free in the public preview stage. After the public preview stage elapses, you are charged for this feature based on the amount of CPU time that you use.
  • The Dedicated SQL feature and the Standard SQL feature are both available. You can choose between these features based on your business requirements.

Benefits

The Dedicated SQL feature has the following advantages over the Standard SQL feature:
  • The Dedicated SQL feature can analyze hundreds of billions of data records with high performance.
  • The Dedicated SQL feature allows each project to support a maximum of 150 concurrent operations, whereas Standard SQL feature allows each project to support a maximum of 15 concurrent operations.
  • The Dedicated SQL feature is allocated exclusive resources. The performance of the Dedicated SQL is not affected by bursts of traffic from other users.

Use scenarios

The Dedicated SQL feature is suitable in the following use scenarios:
  • You need to analyze data with high performance. For example, you need to analyze real-time data.
  • You need to analyze data that is generated over a long time range. For example, you need to analyze data that is generated over a month.
  • You need to analyze a large amount of data. For example, you need to analyze terabytes of data every day.
  • You need to use Log Service to analyze more than 15 concurrent SQL statements and display the analysis results based on multiple metrics from multiple dimensions.

Procedure

  1. Log on to the Log Service console.
  2. In the Projects section, click the name of the project that you want to view.
  3. Choose Log Storage > Logstores. On the Logstores tab, click the Logstore that you want to view.
  4. Click the Dedicated SQL icon.
    After you enable the Dedicated SQL feature, you can use this feature to analyze SQL statements and query the analysis results. For more information, see Query logs.
    Notice If you enable the Dedicated SQL feature for a Logstore of a project, the analysis and query operations in the other Logstores of the project are not affected.

FAQ

  • How do I enable the Dedicated SQL feature by calling an API operation?

    You can enable the Dedicated SQL feature by calling the GetLogs operation, in which the powerSql or query parameter specifies whether to enable the Dedicated SQL feature. For more information, see GetLogs.

  • How do I obtain the amount of CPU time that I use?
    After you perform analysis and query operations, you can obtain the amount of CPU time that you use in the Log Service console, as shown in the following figure. Billing
  • Can I control the cost of the Dedicated SQL feature?

    Yes, you can modify the number of cores to control the cost of the Dedicated SQL feature. To modify the number of cores, go to the Project Overview page of the project and modify the value of the CUs of SQL-dedicated Instance parameter.

    Number of cores