tencent cloud

TDSQL Boundless

Release Notes
Product Introduction
Overview
Scenarios
Product Architecture
Instance Types
Compatibility Notes
Kernel Features
Kernel Overview
Kernel Version Release Notes
Functionality Features
Performance Features
Billing
Billing Overview
Purchase Method
Pricing Details
Renewal
Overdue Payments
Refund
Getting Started
Creating an Instance
Connect to Instances
User Guide
Data Migration
Data Subscription
Instance Management
Configuration Change
Parameter Configuration
Account Management
Security Group
Backup and Restoration
Database Auditing
Tag Management
Use Cases
Technical Evolution and Usage Practices of Online DDL
Lock Mechanism Analysis and Troubleshooting Practices
Data Intelligent Scheduling and Related Practices for Performance Optimization
TDSQL Boundless Selection Guide and Practical Tutorial
Developer Guide
Developer Guide (MySQL Compatibility Mode)
Developer Guide (HBase Compatibility Mode)
Performance Tuning
Performance Tuning Overview
SQL Tuning
DDL Tuning
Performance White Paper
Performance Overview
TPC-C Test
Sysbench Test
API Documentation
History
Introduction
API Category
Making API Requests
Instance APIs
Security Group APIs
Task APIs
Backup APIs
Rollback APIs
Parameter APIs
Database APIs
Data Types
Error Codes
General Reference
System Architecture
SQL Reference
Database Parameter Description
TPC-H benchmark data model reference
Error Code Information
Security and Compliance
FAQs
Agreements
Service Level Agreement
Terms of Service
Privacy Policy
Data Processing And Security Agreement
Contact Us
Glossary

SQL Syntax Compatibility

PDF
Mode fokus
Ukuran font
Terakhir diperbarui: 2026-02-10 11:05:59

SQL Syntax Compatibility Statement

The TDSQL Boundless columnar vector engine supports most standard SQL queries and all TPC-H queries. However, it has its own characteristics and may fall back to the TDSQL Boundless row storage engine for execution in certain scenarios due to unsupported features. Specific limitations are as follows:

User-Defined Variables

The vector engine does not support user-defined variables. When a query SQL contains user-defined variables (for example, SELECT @myvar + col FROM table), the query will not be executed through the vector engine.
SET @cnt = 1;

SELECT *
FROM t1 FORCE INDEX (date_col)
WHERE
col1 + 10000000 > (@cnt := @cnt + 1)
AND date_col >= DATE('2014-04-01')
AND date_col < DATE('2014-04-01' + INTERVAL 1 DAY)
ORDER BY date_col DESC;

SELECT @cnt;

SQL_CALC_FOUND_ROWS / FOUND_ROWS()

The vector engine temporarily does not support the SQL_CALC_FOUND_ROWS related feature. SQL with the following keywords will fall back to the TDSQL TP engine for execution.

WITH RECURSIVE cte

The vector engine currently does not support the Recursive Common Table Expressions feature and will fall back to the TDSQL TP engine for execution.

UNION/UNION ALL + ORDER BY

For UNION/UNION ALL + ORDER BY queries, the ORDER BY fields supported by the vector engine must be fields projected in the subquery within the UNION. Otherwise, it will fall back to the TDSQL TP engine for execution.
--Suppoted--
SELECT a n FROM t1 UNION SELECT b n FROM t2 ORDER BY n;
--Unsuppoted--
SELECT a n FROM t1 UNION SELECT b n FROM t2 ORDER BY n * 2;

Character Set and Collation

The vector engine supports limited character sets and collations. Others will fall back to the TDSQL TP engine for execution.
Supported character sets: "utf8", "utf8mb3", "utf8mb4", "binary".
Unsupported collations: "utf8_german2_ci", "utf8mb4_czech_ci", "latin1_german2_ci", "latin1_bin", "utf8mb4_lithuanian_ci", "utf8_lithuanian_ci", "utf8_czech_ci", "utf8mb4_polish_ci".
Table-level restriction: as long as any field in the table definition does not belong to the character sets mentioned above, the operation will fall back.
Character set compatibility: When string types are compared, the vector engine is case-insensitive but accent-sensitive. This may lead to inconsistencies with MySQL's TP results for accented characters. For example:
tdsql [db1]> create table t1(c1 varchar(32), c2 varchar(32));
Query OK, 0 rows affected (0.70 sec)

tdsql[db1]> show create table t1;
+-------+-------------------------------------------------------------------------------------------------------------------------------+
| Table | Create Table |
+-------+-------------------------------------------------------------------------------------------------------------------------------+
| t1 | CREATE TABLE `t1` (
`c1` varchar(32) DEFAULT NULL,
`c2` varchar(32) DEFAULT NULL
) ENGINE=ROCKSDB DEFAULT CHARSET=utf8mb3 |
+-------+-------------------------------------------------------------------------------------------------------------------------------+
1 row in set (0.00 sec)

tdsql[db1]> insert into t1 values('hello','hElLÖ');
Query OK, 1 row affected (0.02 sec)

tdsql[db1]> select * from t1;
+-------+--------+
| c1 | c2 |
+-------+--------+
| hello | hElLÖ |
+-------+--------+
1 row in set (0.00 sec)

tdsql[db1]> select c1=c2 from t1;
+-------+
| c1=c2 |
+-------+
| 1 |
+-------+
1 row in set (0.00 sec)

tdsql[db1]> set htap_routing_strategy='vector_engine';
Query OK, 0 rows affected (0.00 sec)

tdsql [db1]> set htap_query_passthrough_mode=off;
Query OK, 0 rows affected (0.00 sec)

tdsql[db1]> set htap_print_deparsed_query=on;
Query OK, 0 rows affected (0.00 sec)

tdsql[db1]> select c1=c2 from t1;
+-------+
| c1=c2 |
+-------+
| 0 |
+-------+
1 row in set, 1 warning (0.01 sec)

tdsql[db1]> show warnings;
+-------+------+-----------------------------------------------------------------------------------------------------+
| Level | Code | Message |
+-------+------+-----------------------------------------------------------------------------------------------------+
| Note | 1003 | Deparsed query is : select ("t1"."c1" = "t1"."c2" collate nocase ) AS "c1=c2" from "db1"."t1" "t1" |
+-------+------+-----------------------------------------------------------------------------------------------------+
1 row in set (0.00 sec)

Parameters Related to the Vector Engine

No.
Variable Name
Type
Description
1
htap_avoid_some_mysql_optimizations
Boolean
Whether to enable optimizer intervention to optimize vector queries, default (on).
2
htap_enable_deparser_warnings
Boolean
For alarms triggered for VE parsing, default (off).
3
htap_routing_strategy
String
Query policy has the following possible options:
'VECTOR_ENGINE': defaults to using the vector engine.
'DEFAULT': defaults to the TP engine.
4
htap_query_passthrough_mode
Boolean
Whether to perform semantic parsing for the vector engine. When set to on, SQL statements are directly passed to the VE engine to retrieve results. Default (off).
5
htap_print_deparsed_query
Boolean
Whether to output logs from the vector parsing engine to the log file, default (off).
6
htap_enable_ve_execution_fallback
Boolean
When the vector engine reports an error, whether to fallback to TP execution or directly report an error, default (on).

Bantuan dan Dukungan

Apakah halaman ini membantu?

masukan