All Products
Search
Document Center

Tablestore:DQL operations

Last Updated:Feb 17, 2025

Tablestore DQL operations are compatible with the query syntax of MySQL. This topic describes the features supported by DQL operations.

Background information

Tablestore provides cloud-native SQL engine capabilities in addition to the conventional storage of NoSQL structured data. SQL queries are compatible with MySQL query syntax. For more information, see Query data.

Supported features

You can use the SELECT statement in combination with aggregate functions, query features of search indexes, and the JOIN function to perform multi-dimensional data queries and analysis. The following table describes the features.

Feature

Description

Aggregate functions

An aggregate function performs a calculation on specific field values in a set of rows and returns a single value, such as the sum, average value, maximum value, or minimum value.

Full-text search

You can use a match query or match phrase query condition as the WHERE clause in a SELECT statement and execute the SELECT statement to query data in a table that matches a specific string by using a search index that is created for the table. This way, you can perform full-text search.

Array type in search indexes

You can specify an ARRAY_EXTRACT condition as the WHERE clause in a SELECT statement and execute the SELECT statement to query data in Array fields in a search index.

NESTED supported in search indexes

You can use a subfield of a Nested field in combination with operators or use the NESTED_QUERY(subcol_column_condition) function as the WHERE clause of a SELECT statement to query data in Nested fields in a search index.

Virtual columns of search indexes

You can use a virtual column as the WHERE clause of a SELECT statement to query data. You can also use a virtual column in aggregation to analyze data. Grouping, sorting, and TopN queries based on a virtual column are supported.

KNN vector query of search indexes

You can specify the VECTOR_QUERY_FLOAT32 function as the WHERE clause in a SELECT statement and execute the SELECT statement to query data in Vector fields in a search index. You can also use the SCORE() function as the column expression of a SELECT statement to obtain the relevance scores of the query results.

Join

You can use the JOIN function to join two or more tables and return data that meets the join and query conditions.

JSON functions

You can use JSON functions as the column expression of a SELECT statement to query JSON data.