test case:
- mysql> create schema mydbt;
- Query OK, 1 row affected (0.02 sec)
- mysql> create table mydbt.t1 (id int);
- Query OK, 0 rows affected (0.01 sec)
- mysql> insert mydbt.t1 select 1;
- Query OK, 1 row affected, 1 warning (0.00 sec)
- Records: 1 Duplicates: 0 Warnings: 1
- Warning (Code 8585): turbo does not support this sql statement: {"exception_type":"Parser","exception_message":"From DUAL clause is not yet supported"}
- mysql> insert mydbt.t1 select 1;
- Query OK, 1 row affected, 1 warning (0.00 sec)
- Records: 1 Duplicates: 0 Warnings: 1
- Warning (Code 8585): turbo does not support this sql statement: {"exception_type":"Parser","exception_message":"From DUAL clause is not yet supported"}
- mysql> insert mydbt.t1 select 1;
- Query OK, 1 row affected, 1 warning (0.00 sec)
- Records: 1 Duplicates: 0 Warnings: 1
- Warning (Code 8585): turbo does not support this sql statement: {"exception_type":"Parser","exception_message":"From DUAL clause is not yet supported"}
- mysql>
- mysql>
- mysql> EXPLAIN analyze SELECT /*+ SET_VAR(turbo_enable=ON) SET_VAR(turbo_cost_threshold=0) */ * FROM mydbt.t1;
- +-----------------------------------------------------------------------------------------------------------+
- | EXPLAIN |
- +-----------------------------------------------------------------------------------------------------------+
- | -> Turbo scan
- -> Table scan on t1, column(id) (cost=0.3, row=3) (actual time=4.887 rows=3 loops=1)
- |
- +-----------------------------------------------------------------------------------------------------------+
- 1 row in set (0.02 sec)
- mysql> show var^C
- ^C
- mysql> show variables like '%turbo%';
- +---------------------------------+--------------------+
- | Variable_name | Value |
- +---------------------------------+--------------------+
- | turbo_compat_func | ON |
- | turbo_condition_pushdown | OFF |
- | turbo_cost_threshold | 0.000000 |
- | turbo_enable | ON |
- | turbo_enable_ps_and_sp | ON |
- | turbo_enable_rollback | OFF |
- | turbo_enable_warning | ON |
- | turbo_exec | |
- | turbo_index_range | ON |
- | turbo_max_temp_directory_size | 1073741824 |
- | turbo_memory_limit | 268435456 |
- | turbo_parallel_read_buffer_size | 2097152 |
- | turbo_release_retries | 600 |
- | turbo_retry_pause | 1000 |
- | turbo_skip_charset_check | OFF |
- | turbo_temp_directory | duckdb_dp.data.tmp |
- | turbo_worker_threads | 4 |
- +---------------------------------+--------------------+
- 17 rows in set (0.00 sec)
复制代码
查看error log
- [root@anolis8 log]# tail /var/log/mysqld.log
- Turbo scan
- -> Table scan on t1, column(id) (cost=0.3, row=3) (actual time=1085.682 rows=3 loops=1)
- Turbo scan
- -> Table scan on t1, column(id) (cost=0.3, row=3) (actual time=4.887 rows=3 loops=1)
复制代码
这不符合预期吧?
|