Overview
Scenarios
Product Architecture
Instance Types
Compatibility Notes
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)WHEREcol1 + 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 related feature. SQL with the following keywords will fall back to the TDSQL TP engine for execution.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;
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)
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). |
피드백