insert into ... select ... 语句无法使用PDML和旁路导入

【 使用环境 】测试环境
【 OB or 其他组件 】OB
【 使用版本 】v4.3.5.0
【问题描述】insert into … select … 语句无法使用PDML和旁路导入,报错 ERROR 1235 (0A000): PDML is disabled, direct load is not supported
【复现路径】问题出现前后相关操作

  1. 部署集群,选用 OLAP 场景创建租户
obd cluster autodeploy obtest -c ob.yaml
obd cluster tenant create obtest -n test --max-cpu=28 --memory-size=98G --zone-list=zone1,zone2,zone3 --primary-zone=RANDOM \
--locality=F@zone1,F@zone2,F@zone3 --charset=utf8 -s 'ob_tcp_invited_nodes="%"' --optimize=olap
  1. 调整配置参数
set global parallel_servers_target = 560; -- MIN_CPU * 20;
ALTER SYSTEM SET default_table_store_format = 'row';
SET GLOBAL parallel_degree_policy = MANUAL;
  1. 用 sysbench 准备3个表数据,每个表1000万行
  2. create table tmp1 like sbtest1;
  3. explain Insert into select 语句,无论有没有使用 hint 均无法执行
mysql> EXPLAIN EXTENDED insert /*+ enable_parallel_dml DIRECT(true, 0, 'full') parallel(16) */ into tmp1 select * from sbtest1;
ERROR 1235 (0A000): PDML is disabled, direct load is not supported
mysql> EXPLAIN EXTENDED insert /*+ enable_parallel_dml parallel(16) */ into tmp1 select * from sbtest1;
ERROR 1235 (0A000): PDML is disabled, direct load is not supported
mysql> EXPLAIN EXTENDED insert into tmp1 select * from sbtest1;
ERROR 1235 (0A000): PDML is disabled, direct load is not supported
  1. 手工设置参数,依然无效
    SET _FORCE_PARALLEL_DML_DOP = 16;
  2. 手工改表的并行度,依然无效
mysql> ALTER TABLE tmp1 PARALLEL 16;
Query OK, 0 rows affected (0.72 sec)

mysql> show create table tmp1
    -> ;
+-------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
| Table | Create Table
                                                                                                                                                                                                                                                                             |
+-------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
| tmp1  | CREATE TABLE `tmp1` (
  `id` int(11) NOT NULL AUTO_INCREMENT,
  `k` int(11) NOT NULL DEFAULT '0',
  `c` char(120) COLLATE utf8mb4_bin NOT NULL DEFAULT '',
  `pad` char(60) COLLATE utf8mb4_bin NOT NULL DEFAULT '',
  PRIMARY KEY (`id`),
  KEY `k_1` (`k`) BLOCK_SIZE 16384 LOCAL
) AUTO_INCREMENT = 1 AUTO_INCREMENT_MODE = 'ORDER' DEFAULT CHARSET = utf8mb4 COLLATE = utf8mb4_bin ROW_FORMAT = DYNAMIC COMPRESSION = 'zstd_1.3.8' REPLICA_NUM = 3 BLOCK_SIZE = 16384 USE_BLOOM_FILTER = FALSE TABLET_SIZE = 134217728 PCTFREE = 0 PARALLEL 16 |
+-------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
1 row in set (0.03 sec)

mysql> ALTER TABLE sbtest1 PARALLEL 16;
Query OK, 0 rows affected (0.12 sec)

mysql> EXPLAIN EXTENDED insert into tmp1 select * from sbtest1;
ERROR 1235 (0A000): PDML is disabled, direct load is not supported

用hint 执行 select 语句是可以使用上并行执行的

mysql>  explain extended select  /*+ ENABLE_PARALLEL_DML PARALLEL(3) */ * from sbtest1;
+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
| Query Plan                                                                                                                                                                                |
+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
| =========================================================                                                                                                                                 |                                                                                   | |ID|OPERATOR             |NAME    |EST.ROWS|EST.TIME(us)|                                                                                                                                 |
| ---------------------------------------------------------                                                                                                                                 |
| |0 |PX COORDINATOR       |        |14246719|57799748    |                                                                                                                                 |
| |1 |+-EXCHANGE OUT DISTR |:EX10000|14246719|25167643    |                                                                                                                                 |                                                                                   | |2 |  +-PX BLOCK ITERATOR|        |14246719|691938      |                                                                                                                                 |
| |3 |    +-TABLE FULL SCAN|sbtest1 |14246719|691938      |                                                                                                                                 |
| =========================================================                                                                                                                                 |
| Outputs & filters:                                                                                                                                                                        |
| -------------------------------------                                                                                                                                                     |
|   0 - output([INTERNAL_FUNCTION(sbtest1.id(0x7f2ad601fa50), sbtest1.k(0x7f2ad601fea0), sbtest1.c(0x7f2ad60202f0), sbtest1.pad(0x7f2ad6020740))(0x7f2ad60e6810)]), filter(nil), rowset=256 |
|   1 - output([INTERNAL_FUNCTION(sbtest1.id(0x7f2ad601fa50), sbtest1.k(0x7f2ad601fea0), sbtest1.c(0x7f2ad60202f0), sbtest1.pad(0x7f2ad6020740))(0x7f2ad60e6810)]), filter(nil), rowset=256 |
|       dop=3                                                                                                                                                                               |
|   2 - output([sbtest1.id(0x7f2ad601fa50)], [sbtest1.k(0x7f2ad601fea0)], [sbtest1.c(0x7f2ad60202f0)], [sbtest1.pad(0x7f2ad6020740)]), filter(nil), rowset=256                              |
|   3 - output([sbtest1.id(0x7f2ad601fa50)], [sbtest1.k(0x7f2ad601fea0)], [sbtest1.c(0x7f2ad60202f0)], [sbtest1.pad(0x7f2ad6020740)]), filter(nil), rowset=256                              |                                                                                   |       access([sbtest1.id(0x7f2ad601fa50)], [sbtest1.k(0x7f2ad601fea0)], [sbtest1.c(0x7f2ad60202f0)], [sbtest1.pad(0x7f2ad6020740)]), partitions(p0)                                       |
|       is_index_back=false, is_global_index=false,                                                                                                                                         |
|       range_key([sbtest1.id(0x7f2ad601fa50)]), range(MIN ; MAX)always true                                                                                                                |
| Used Hint:                                                                                                                                                                                |
| -------------------------------------                                                                                                                                                     |
|   /*+                                                                                                                                                                                     |
|                                                                                                                                                                                           |
|       PARALLEL(3)                                                                                                                                                                         |
|       ENABLE_PARALLEL_DML                                                                                                                                                                 |
|   */                                                                                                                                                                                      |
| Qb name trace:                                                                                                                                                                            |
| -------------------------------------
| Qb name trace:                                                                                                                                                                            |                                                                          [116/605]
| -------------------------------------                                                                                                                                                     |
|   stmt_id:0, stmt_type:T_EXPLAIN                                                                                                                                                          |
|   stmt_id:1, SEL$1                                                                                                                                                                        |
| Outline Data:                                                                                                                                                                             |
| -------------------------------------                                                                                                                                                     |
|   /*+                                                                                                                                                                                     |
|       BEGIN_OUTLINE_DATA                                                                                                                                                                  |
|       PARALLEL(@"SEL$1" "sbtest"."sbtest1"@"SEL$1" 3)                                                                                                                                     |
|       FULL(@"SEL$1" "sbtest"."sbtest1"@"SEL$1")                                                                                                                                           |
|       PARALLEL(3)                                                                                                                                                                         |
|       OPTIMIZER_FEATURES_ENABLE('4.3.5.0')                                                                                                                                                |
|       END_OUTLINE_DATA                                                                                                                                                                    |
|   */                                                                                                                                                                                      |
| Optimization Info:                                                                                                                                                                        |
| -------------------------------------                                                                                                                                                     |
|   sbtest1:                                                                                                                                                                                |
|       table_rows:6111888                                                                                                                                                                  |
|       physical_range_rows:14246719                                                                                                                                                        |
|       logical_range_rows:14246719                                                                                                                                                         |
|       index_back_rows:0                                                                                                                                                                   |
|       output_rows:14246719                                                                                                                                                                |
|       table_dop:3                                                                                                                                                                         |
|       dop_method:Global DOP                                                                                                                                                               |
|       avaiable_index_name:[k_1, sbtest1]                                                                                                                                                  |
|       pruned_index_name:[k_1]                                                                                                                                                             |
|       stats info:[version=2025-01-20 17:22:24.528913, is_locked=0, is_expired=0]                                                                                                          |
|       dynamic sampling level:0                                                                                                                                                            |
|       estimation method:[OPTIMIZER STATISTICS, STORAGE]                                                                                                                                   |
|   Plan Type:                                                                                                                                                                              |
|       DISTRIBUTED                                                                                                                                                                         |
|   Note:                                                                                                                                                                                   |
|       Degree of Parallelism is 3 because of hint                                                                                                                                          |
+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+                                                                                   58 rows in set (0.01 sec)

【附件及日志】推荐使用OceanBase敏捷诊断工具obdiag收集诊断信息,详情参见链接(右键跳转查看):

【SOP系列 22 】——故障诊断第一步(自助诊断和诊断信息收集)
表结构:

mysql> show create table sbtest1;
+---------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
| Table   | Create Table                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                     |
+---------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
| sbtest1 | CREATE TABLE `sbtest1` (
  `id` int(11) NOT NULL AUTO_INCREMENT,
  `k` int(11) NOT NULL DEFAULT '0',
  `c` char(120) COLLATE utf8mb4_bin NOT NULL DEFAULT '',
  `pad` char(60) COLLATE utf8mb4_bin NOT NULL DEFAULT '',
  PRIMARY KEY (`id`),
  KEY `k_1` (`k`) BLOCK_SIZE 16384 LOCAL
) AUTO_INCREMENT = 10000001 AUTO_INCREMENT_MODE = 'ORDER' DEFAULT CHARSET = utf8mb4 COLLATE = utf8mb4_bin ROW_FORMAT = DYNAMIC COMPRESSION = 'zstd_1.3.8' REPLICA_NUM = 3 BLOCK_SIZE = 16384 USE_BLOOM_FILTER = FALSE TABLET_SIZE = 134217728 PCTFREE = 0 |
+---------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
1 row in set (0.01 sec)

【备注】基于 LLM 和开源文档 RAG 的论坛小助手已开放测试,在发帖时输入 [@论坛小助手] 即可召唤小助手,欢迎试用!

日志采集场景: SQL执行出错
日志采集命令: obdiag gather scene run --scene=observer.sql_err --env “{db_connect=’-h127.0.0.1 -P2881 -utest@test -p****** -Dtest’, trace_id=‘Yxx’}”

根据您描述的问题,OceanBase 数据库在执行 insert into ... select ... 语句时无法启用 PDML(并行数据修改语言)和旁路导入功能,并报错提示“PDML is disabled, direct load is not supported”。这可能是由于当前集群配置或环境设置限制了这些功能的使用。为了更好地了解问题原因,请先使用 obdiag 工具进行日志采集,以便我们进一步分析。

另外,为了确定具体的问题,在此需要您提供一些信息:

  1. 您是否确认当前 OceanBase 版本为 v4.3.5.0?
  2. 在执行该 SQL 语句之前是否有过任何系统配置更改或升级操作?
  3. 是否尝试过其他类型的批量插入操作,如单条记录插入或多条记录批量插入?它们的表现如何?
  4. 能否提供具体的 SQL 语句以及相关表结构信息?

请将采集到的日志压缩包发送给我们,以便我们能够更准确地定位问题。同时,您可以参考官方文档检查是否满足使用 PDML 和旁路导入功能的前提条件。如果问题仍然存在,我们将继续协助您排查。

附上敏捷诊断工具 obdiag 使用帮助链接

1 个赞

我现在都不是pdml用不了,是insert into tmp1 select * from sbtest1; 都执行不了。好歹用传统路径单并发也要给我执行起来啊 :upside_down_face:

mysql> EXPLAIN EXTENDED insert into tmp1 select * from sbtest1;
ERROR 1235 (0A000): PDML is disabled, direct load is not supported

根据文档库中的信息,INSERT INTO ... SELECT ... 语句在 OceanBase 中执行时遇到错误“PDML is disabled, direct load is not supported”,这通常意味着系统配置或环境设置限制了并行 DML(PDML)和旁路导入功能的使用。然而,您提到即使是传统的单并发插入路径也无法正常工作,这是不正常的。

分析与建议

  1. 检查全局参数设置

    • 确认 enable_parallel_dml 参数是否被禁用。可以通过以下命令查看:
      SHOW GLOBAL VARIABLES LIKE 'enable_parallel_dml';
      
    • 如果该参数值为 OFF,则需要将其设置为 ON:
      SET GLOBAL enable_parallel_dml = ON;
      
  2. 确认租户级别配置

    • 检查当前租户是否启用了 PDML 功能。可以尝试通过以下命令来确保租户级别的配置正确:
      ALTER SYSTEM SET parallel_degree_policy = AUTO;
      
  3. 验证表结构及约束

    • 根据文档片段,某些特定类型的表(如含有生成列、外键或非主键索引的表)可能不支持旁路导入。请检查 tmp1sbtest1 表是否存在这些特性。
    • 使用如下命令获取表详情:
      SHOW CREATE TABLE tmp1;
      SHOW CREATE TABLE sbtest1;
      
  4. 简化测试场景

    • 尝试创建一个最简单的临时表来进行插入操作,排除其他因素干扰:
      CREATE TEMPORARY TABLE test_tmp (id INT);
      INSERT INTO test_tmp SELECT id FROM sbtest1 LIMIT 10;
      
  5. 日志分析

    • 如前所述,使用 obdiag 工具收集诊断信息可以帮助更深入地了解问题根源。具体步骤可参考提供的链接。
  6. 版本兼容性

    • 确保使用的 OceanBase 版本确实支持所需的特性。虽然 v4.3.5.0 应该已经支持 PDML 和旁路导入,但最好还是查阅官方发行说明以确认是否有已知的问题或者补丁。
  7. 联系技术支持

    • 如果经过上述排查仍然无法解决问题,建议联系 OceanBase 的官方技术支持团队获取进一步的帮助和支持。

综上所述,请先按照以上步骤逐一排查,并提供更多的上下文信息以便我们能够更好地帮助您解决问题。希望这些建议能对您有所帮助!

详情请参考:

  1. 增量旁路导入
  2. ETL 加速
  3. 全量旁路导入
  4. 使用 SQL 命令进行数据迁移
  5. 插入数据
  6. 并行执行分类与优化

(小助手的答复已结束,如未能解决您的问题,请继续提问并等待其他同学的回复,谢谢!)

1 个赞

AI 的回复总是那么一本正经 :slightly_smiling_face:

mysql> SHOW GLOBAL VARIABLES LIKE 'enable_parallel_dml';
Empty set (0.01 sec)

mysql> SET GLOBAL enable_parallel_dml = ON;
ERROR 1193 (HY000): Unknown system variable 'enable_parallel_dml'

你使用这种hint试试/+ENABLE_PARALLEL_DML PARALLEL(n)/

用过了,请看【复现路径】步骤5

直接执行insert into 不查询执行计划EXPLAIN EXTENDED也是相同报错么

原因找到了:

  1. 因为主键是自增的类型所以用不了 PDML;
  2. PDML 用不了导致旁路导入用不了。
  3. 用 OLAP 场景创建租户,租户参数default_load_mode 会默认被设为 FULL_DIRECT_WRITE,导致insert 语句强制使用旁路导入。所以什么hint都没有使用的情况下,insert into select也没有办法用传统模式单并发跑起来。

debug 过程:

  1. 使用 /*+ no_direct */ 绕过旁路导入,得知 PDML 不能使用的原因是 PDML disabled because the insert statement primary key has specified auto-increment
mysql> EXPLAIN EXTENDED insert /*+ no_direct */ into tmp1 select * from sbtest1;
+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
| Query Plan                                                                                                                                                                                             |
+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
| ====================================================================                                                                                                                                   |
| |ID|OPERATOR                 |NAME           |EST.ROWS|EST.TIME(us)|                                                                                                                                   |
| --------------------------------------------------------------------                                                                                                                                   |
| |0 |DISTRIBUTED INSERT       |               |10000000|78319933    |                                                                                                                                   |
| |1 |+-PX COORDINATOR         |               |10000000|14993082    |                                                                                                                                   |
| |2 |  +-EXCHANGE OUT DISTR   |:EX10000       |10000000|1163865     |                                                                                                                                   |
| |3 |    +-SUBPLAN SCAN       |ANONYMOUS_VIEW1|10000000|52983       |                                                                                                                                   |
| |4 |      +-PX BLOCK ITERATOR|               |10000000|52038       |                                                                                                                                   |
| |5 |        +-TABLE FULL SCAN|sbtest1        |10000000|52038       |                                                                                                                                   |
| ====================================================================                                                                                                                                   |
| Outputs & filters:                                                                                                                                                                                     |
| -------------------------------------                                                                                                                                                                  |
|   0 - output(nil), filter(nil)                                                                                                                                                                         |
|       columns([{tmp1: ({tmp1: (tmp1.id(0x7f2c68c11710), tmp1.k(0x7f2c68c11b60), tmp1.c(0x7f2c68c11fb0), tmp1.pad(0x7f2c68c12400))})}]), partitions(p0),                                                |
|                                                                                                                                                                                                        |
|       column_values([column_conv(INT,PS:(11,0),NOT NULL,tmp1.id.nextval(column_conv(INT,PS:(11,0),NOT NULL,ANONYMOUS_VIEW1.id(0x7f2c68c27e30))(0x7f2c68c28fa0))(0x7f2c68c30eb0))(0x7f2c68c37740)],     |
|        [column_conv(INT,PS:(11,0),NOT NULL,ANONYMOUS_VIEW1.k(0x7f2c68c28280))(0x7f2c68c57da0)], [column_conv(CHAR,utf8mb4_bin,length:120,NOT NULL,ANONYMOUS_VIEW1.c(0x7f2c68c286d0))(0x7f2c68c5fcd0)], |
|        [column_conv(CHAR,utf8mb4_bin,length:60,NOT NULL,ANONYMOUS_VIEW1.pad(0x7f2c68c28b20))(0x7f2c68c67c10)])                                                                                         |
|   1 - output([ANONYMOUS_VIEW1.id(0x7f2c68c27e30)], [ANONYMOUS_VIEW1.k(0x7f2c68c28280)], [ANONYMOUS_VIEW1.c(0x7f2c68c286d0)], [ANONYMOUS_VIEW1.pad(0x7f2c68c28b20)]), filter(nil), rowset=256           |
|   2 - output([ANONYMOUS_VIEW1.id(0x7f2c68c27e30)], [ANONYMOUS_VIEW1.k(0x7f2c68c28280)], [ANONYMOUS_VIEW1.c(0x7f2c68c286d0)], [ANONYMOUS_VIEW1.pad(0x7f2c68c28b20)]), filter(nil), rowset=256           |
|       dop=28                                                                                                                                                                                           |
|   3 - output([ANONYMOUS_VIEW1.id(0x7f2c68c27e30)], [ANONYMOUS_VIEW1.k(0x7f2c68c28280)], [ANONYMOUS_VIEW1.c(0x7f2c68c286d0)], [ANONYMOUS_VIEW1.pad(0x7f2c68c28b20)]), filter(nil), rowset=256           |
|       access([ANONYMOUS_VIEW1.id(0x7f2c68c27e30)], [ANONYMOUS_VIEW1.k(0x7f2c68c28280)], [ANONYMOUS_VIEW1.c(0x7f2c68c286d0)], [ANONYMOUS_VIEW1.pad(0x7f2c68c28b20)])                                    |
|   4 - output([sbtest1.id(0x7f2c68c269a0)], [sbtest1.k(0x7f2c68c26df0)], [sbtest1.c(0x7f2c68c27240)], [sbtest1.pad(0x7f2c68c27690)]), filter(nil), rowset=256                                           |
|   5 - output([sbtest1.id(0x7f2c68c269a0)], [sbtest1.k(0x7f2c68c26df0)], [sbtest1.c(0x7f2c68c27240)], [sbtest1.pad(0x7f2c68c27690)]), filter(nil), rowset=256                                           |
|       access([sbtest1.id(0x7f2c68c269a0)], [sbtest1.k(0x7f2c68c26df0)], [sbtest1.c(0x7f2c68c27240)], [sbtest1.pad(0x7f2c68c27690)]), partitions(p0)                                                    |
|       is_index_back=false, is_global_index=false,                                                                                                                                                      |
|       range_key([sbtest1.id(0x7f2c68c269a0)]), range(MIN ; MAX)always true                                                                                                                             |

| Used Hint:                                                                                                                                                                                             |
| -------------------------------------                                                                                                                                                                  |
|   /*+                                                                                                                                                                                                  |
|                                                                                                                                                                                                        |
|       NO_DIRECT                                                                                                                                                                                        |
|   */                                                                                                                                                                                                   |
| Qb name trace:                                                                                                                                                                                         |
| -------------------------------------                                                                                                                                                                  |
|   stmt_id:0, stmt_type:T_EXPLAIN                                                                                                                                                                       |
|   stmt_id:1, INS$1                                                                                                                                                                                     |
|   stmt_id:2, SEL$1                                                                                                                                                                                     |
| Outline Data:                                                                                                                                                                                          |
| -------------------------------------                                                                                                                                                                  |
|   /*+                                                                                                                                                                                                  |
|       BEGIN_OUTLINE_DATA                                                                                                                                                                               |
|       USE_DISTRIBUTED_DML(@"INS$1")                                                                                                                                                                    |
|       PARALLEL(@"SEL$1" "sbtest"."sbtest1"@"SEL$1" 28)                                                                                                                                                 |
|       FULL(@"SEL$1" "sbtest"."sbtest1"@"SEL$1")                                                                                                                                                        |
|       PARALLEL( AUTO )                                                                                                                                                                                 |
|       OPTIMIZER_FEATURES_ENABLE('4.3.5.0')                                                                                                                                                             |
|       NO_DIRECT                                                                                                                                                                                        |
|       END_OUTLINE_DATA                                                                                                                                                                                 |
|   */                                                                                                                                                                                                   |
| Optimization Info:                                                                                                                                                                                     |
| -------------------------------------                                                                                                                                                                  |
|   sbtest1:                                                                                                                                                                                             |
|       table_rows:6111888                                                                                                                                                                               |
|       physical_range_rows:10000000                                                                                                                                                                     |
|       logical_range_rows:10000000                                                                                                                                                                      |
|       index_back_rows:0                                                                                                                                                                                |
|       output_rows:10000000                                                                                                                                                                             |
|       table_dop:28                                                                                                                                                                                     |
|       dop_method:Auto DOP                                                                                                                                                                              |
|       avaiable_index_name:[k_1, sbtest1]                                                                                                                                                               |
|       pruned_index_name:[k_1]                                                                                                                                                                          |
|       stats info:[version=2025-01-20 17:22:24.528913, is_locked=0, is_expired=0]                                                                                                                       |
|       dynamic sampling level:0                                                                                                                                                                         |
|       estimation method:[OPTIMIZER STATISTICS, STORAGE]                                                                                                                                                |
|   Plan Type:                                                                                                                                                                                           |
|       DISTRIBUTED                                                                                                                                                                                      |
|   Note:                                                                                                                                                                                                |
|       PDML disabled because the insert statement primary key has specified auto-increment column                                                                                                       |
|       Degree of Parallelisim is 28 because of Auto DOP                                                                                                                                                 |
+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
71 rows in set (0.01 sec)
  1. 查看系统为什么默认强制使用旁路导入,发现 default_load_mode 不是默认值 disable,而是FULL_DIRECT_WRITE


  2. 检查OLAP场景默认参数,文档 实时分析场景配置最佳实践 没有及时更新,里面没有提到default_load_mode参数被修改了,导致我一开始不知道这个参数被改了。

4 个赞

学习了

还没看到有这个场景的说法啊。下次可能要检查下了,别埋着隐藏的雷。

用最新 obd 部署 v4.3.5.0部署的时候会问你要用哪种场景,默认参数不一样

实在不行就曲线救国,先用obdumper导出成csv,然后再用load data的direct模式导入,看看能不能快一些

不行的,这俩都不支持自增列,把这个属性删了可以。


https://www.oceanbase.com/docs/common-oceanbase-database-cn-1000000002012783