Skip to content

Releases: oceanbase/oceanbase

v4.2.1_CE_BP6

15 May 09:35
Compare
Choose a tag to compare

Version information

Information Description
Release date May 15, 2024
Version V4.2.1_CE_BP6
Commit number 38166dc
OBServer RPM version oceanbase-ce-4.2.1.6-106000012024042515

Performance optimization

Optimization of show table status performance: In earlier versions, the performance of the show table status from ... like ... command is not ideal because it did not make use of indexes related to table_name. In the new version, significant improvement in query performance has been achieved for scenarios with single table filtering conditions.

Bug fixes

  • Fixed the issue where after SET collation_connection = 'utf8mb4_unicode_ci' is executed, comparing/joining columns of string type in information_schema would cause an error Illegal mix of collations, which is not compatible with native MySQL.
  • Fixed the issue where reading and writing LOB data during the upgrades while running both the old and new versions could lead to OBServer core dump.
  • Fixed the memory leak issue caused by asynchronous query timeouts in OBKV.

版本信息

项目 描述
发布日期 2024-05-15
版本号 V4.2.1_CE_BP6
Commit 号 38166dc
OBServer RPM 版本号 oceanbase-ce-4.2.1.6-106000012024042515

性能优化

优化 show table status 性能: 老版本 show table status from ... like ... 场景性能较差,未利用 table_name 相关索引。新版本针对存在单表过滤条件的场景,显著提升查询性能。

缺陷修复

  • 修复 SET collation_connection = 'utf8mb4_unicode_ci' 后,information_schema 下字符串类型的列比较/关联操作,会报错 Illegal mix of collations,和原生 MySQL 不兼容的问题。
  • 修复升级混跑过程中读写 LOB 数据可能导致 OBServer Core 的问题。
  • 修复 OBKV 异步查询超时后导致内存泄漏的问题。

v4.2.3_CE_BETA

29 Apr 02:53
Compare
Choose a tag to compare

版本信息

项目 描述
发布日期 2024-4-29
版本号 V4.2.3_CE_BETA
Commit 号 c129d71
OBServer RPM 版本号 oceanbase-ce-4.2.3.0-100000112024042411

版本定位

V4.2.3_CE_BETA 为 V4.2.x_CE 系列最新版本,支持了一系列 MySQL 兼容特性,如角色、列级权限、Union Distinct RCTE 及大量小功能兼容。在多个场景优化了系统性能,如优化多模类型读写计算和 OBKV 处理效率,扩展 Batch DML 的并行执行能力,提升备份/网络备库性能,解决自增列/Sequence 在 Order 模式下的性能问题等。同时,备份恢复扩展支持了 S3 及兼容 S3 协议的对象存储(如:OBS,GCS)作为备份目的端。在资源优化方面,进行了一系列优化包括 DDL 临时结果空间优化、旁路导入能力提升和全局前后台 CPU 资源隔离等。新版本也实现了多个业务期待的易用性功能,如用于日志分析和误操作识别的 ObLogMiner 功能,应对 Buffer 表性能问题的合并策略选择,提供模糊绑定计划和限流方式的 Format Outline,用于识别无用索引的索引使用监控特性,提供更高可读性的面向数据库管理员的 alert.log 系统日志,增加日志流副本管理的用户命令,提供物理恢复进度展示能力。更详细的 PX 诊断数据以及 ASH Report 的节点级分析等,有效提高系统易用性。

推荐用于测试,暂不建议用于生产。

关键特性说明

内核增强

  • 查询解析能力增强

    SQL 中存在个数特别多的 INLIST 、AND/OR、UNION 时,往往会产生超深语法树解析,进而造成内存消耗过大、栈不足、耗时过长的问题。新版本重写这些极端场景的查询解析实现,降低了解析阶段资源消耗,增强了极端 SQL 执行的稳定性,同时提升了 SQL 解析性能。例如 select sum(c1) from t1 where c1 in (1, 2, 3, ...N) 中 N = 20 万的查询场景,V4.2.3_CE 版本的解析性能相对 V4.2.2_CE 版本可以提升 20%~30%。

  • 查询改写能力增强

    V4.2.3_CE 版本优化器从多个方面优化了查询改写逻辑,例如:

    • 表达式规范化强化:历史版本在 Resolver 解析阶段会对多种表达式进行规范化(Canonicalize),例如将 A and (A or B) 改写为 A ,但未覆盖到 SQL 改写阶段新产生的不规范表达式。新版本引入改写阶段的表达式规范化流程,确保将表达式改写到最简化状态。

    • 条件聚合函数改写:我们将形如 select c1, sum(case when c2 = 0 then c3 else 0 end),sum(case when...)...,... from t1 group by c1, 聚合目标不是某个确定的表达式,而是在运行时根据分支选择条件的判定结果选择出的表达式,称为条件聚合函数。新版本支持了条件聚合函数改写,支持将聚合函数压入每个分支的选择目标上,减少 case when 表达式和聚合函数的计算次数,提升相关场景的执行性能。

    • 多 Min/Max 改写:在 scalar group by 中,若查询中的聚合函数只有 Min/Max,且 Min/Max 的列上有索引,可以将其改写成 order by xxx limit 1,利用索引序消除 Order By 并将 Limit 1 下推到 TABLE SCAN 上,从而减少对数据的读取和排序。对于 SQL 中有多个 Min/Max 存在的场景,历史版本采取了全表扫描方案,新版本考虑将多个 Min/Max 改写成多个子查询,每个子查询都利用索引直接获取到最大值或最小值,以此来避免全表扫描和排序,优化查询性能。

    • 常量 UNION 改写 Values Table:业务较常使用多个 UNION ALL 的组合形式表示一个常量表,在子查询数量过多时,会有较多 CPU 和内存消耗。新版本对常量类型的 UNION ALL/UNION 改写成对 Values Table 的查询,显著降低硬解析阶段的资源消耗。

    • SEMI JOIN 拆分优化:EXISTS 或 IN 子查询中存在多表关联且没有连接条件时,执行计划可能会出现开销较大的笛卡尔积。新版本支持对没有连接条件的表做 SEMI JOIN 拆分改写,避免笛卡尔积开销。

  • 计划选择优化

    V4.2.2_CE 版本实现了新版 Query Range 抽取逻辑,扩展了谓词下压场景,使向量形式谓词的 Range 抽取更加精准,也解决了历史版本 Query Range 的一些内存放大的场景问题。V4.2.3_CE 版本在此基础上修改了 not in 表达式生成 Query Range 的方式,优化了 Range 抽取性能;支持 Range Graph 裁剪,减少最终 Query Range 的抽取数量,降低内存消耗;扩展 INDEX Hint,如指定 /*+index(t1 k1 1)*/ 时,限制只对 k1 索引的第 1 列进行 Query Range 抽取。同时,新版本也支持了 Interesting Ordering 索引路径按规则裁剪,Limit 重计算等策略优化,解决 order by limit 场景因计划选择不优导致的性能问题。

  • 自适应代价模型

    OceanBase 数据库历史版本代价模型是使用内部机器测算的常量参数来代表硬件系统统计信息,通过一系列公式与常量参数来描述每个算子的执行开销。而真实的业务场景中,不同硬件环境可能具备不同的 CPU 时钟频率、不同的顺序读或随机读的速度、不同的网卡带宽等,可能存在代价估算偏差,这些偏差会使得优化器无法在不同的业务环境总是生成最优计划。新版本优化代价模型实现,支持通过 DBMS_STATS 包来收集或设置系统统计信息系数,以达到代价模型自适应硬件的目的。同时也提供了 DBA_OB_AUX_STATISTICS 视图,用于展示当前租户的系统统计信息系数。

  • 复制表属性变更

    复制表是 OceanBase 数据库 V4.2.0 版本开始支持的一种特殊表。这种表可以在任意一个“健康”的副本上读取到数据的最新修改。如果需要转换复制表为普通表,或转换普通表为复制表,V4.2.3_CE 版本之前需要重新建表导数,操作较耗时和复杂。新版本提供复制表属性变更功能,可通过 ALTER TABLE 命令实现表属性转换,降低用户操作成本。

  • 产品行为兼容版本控制

    为了减少因为新版本行为变更导致升级后某些老版本特性使用报错的问题,OceanBase 数据库 V4.2.3_CE 版本新增产品行为兼容版本控制功能,支持通过 ob_compatibility_versionob_security_version 系统变量,分别控制普通行为变更(不报错 -> 报错场景)、安全行为变更(有权限 -> 无权限)是否生效,一个租户中的兼容功能或安全功能按照哪个 OceanBase 版本来兼容,取值范围为 "4.2.3.0" 等发行版本。例如一个功能在 V4.2.4 版本发生了产品行为变更,当变量取值为 4.2.3.0 时,使用旧行为;取值为 4.2.4.0 时,使用新行为。通常升级场景不会自动推高该版本号,需要新版本行为时,请升级后,了解新版本行为并测试后,修改为和当前版本一致的版本号。该方案仅用于控制未来新增的产品行为变更,无法控制已经发版的存量产品行为变更。

    V4.2.3_CE 版本通过 ob_compatibility_version 控制的产品行为有:

    • ob_compatibility_control = MYSQL5.7 时,REPLACE('abd', '', null) 行为由兼容 MySQL 8.0 修改为兼容 MySQL 5.7。
    • UPDATE/DELETE statement 在 Limit 中禁用 Offset。
    • 当投影项是单独的一个 null 值的时候,返回的表头会被修改为 NULL
    • 限制用户变量最长 64 字符。

    通过 ob_security_version 控制的产品行为有:

    • Outline、Sequence 增加权限管控。
    • CREATE TABLESPACE 权限。

MySQL 兼容

  • 角色管理

    OceanBase 数据库 V4.2.3_CE 版本兼容了 MySQL 8.0 的角色管理功能,通过角色来管理维护一组权限,可以更方便地对某一类用户进行授权和回收。与普通用户类似,角色可以被授予或回收权限,也可以被授予或回收其他角色。用户可以被授予多个角色,但仅能使用激活状态角色中的权限。有关角色管理的更多信息,参见 角色管理

  • 列级权限

    V4.2.3_CE 版本新增 MySQL 列级权限功能,可以用于控制用户是否有权限对某张表的某几列进行 SELECT、INSERT 或 UPDATE。

  • Outline、Sequence 权限管控

    历史版本缺少对创建维护 Outline、Sequence 的权限管控,新版本复用 MySQL CREATE、ALTER、DROP 权限,控制 Outline、Sequence 的创建、修改和删除。

  • 自增列切主跳变优化

    OceanBase 数据库在 V4.x 版本支持了创建 ORDER 模式的自增列,更好地兼容了 MySQL 自增列行为。但是 V4.2.3_CE 之前版本在出现切主时,仍会造成自增列跳变。考虑到很多切主场景是用户主动发起的流程,并非异常场景,所以新版本优化为主动切主时仍保持自增列连续性,降低自增列跳变概率。有关自增列的更多信息,参见 自增列

  • 自增列改小

    V4.2.3_CE 之前的版本,仅支持通过 ALTER TABLEAUTO_INCREMENT 值改大,不支持改小,行为上和 MySQL 不完全兼容。新版本补充支持了 AUTO_INCREMENT 值改小的功能,指定新值大于自增列已存在的最大值时,可以设置成功且生效;指定新值小于或等于自增列已存在的最大值时,也可以设置成功,但 AUTO_INCREMENT 会自动调整为自增列已存在的最大值的下一个值。

  • Union Distinct RCTE

    MySQL 8.0 支持了 CTE 的 Recursive Union All 及 Recursive Union Distinct 功能。OceanBase 数据库从 V3.2.3 版本开始支持 MySQL 模式的 Recursive Union,但仅支持 Recursive Union All,V4.2.3_CE 版本扩展兼容了的 MySQL Recursive Union Distinct 功能,保证输出数据的唯一性。同时,新版本还加强了 Recursive Union All 功能,支持可使用内存不足时进行数据落盘。有关 Union Distinct RCTE 的更多信息,参见 通用表表达式

  • 区分 MySQL 5.7/8.0 兼容版本

    MySQL 5.7 与 8.0 在部分场景下存在产品行为冲突,如 replace('a','',null) 在两个版本的输出结果不同。OceanBase 数据库 V4.2.3_CE 版本新增租户级初始化变量 ob_compatibility_control,用于在创建租户时指定存在产品行为冲突的情况是兼容 MySQL 5.7 版本,还是 8.0 版本。租户创建后不可修改,两种模式下均可使用不存在行为冲突的 MySQL 5.7/8.0 的特性超集。

  • 语法/变量/视图支持

    为了支持 MySQL 生态的各类工具或框架无需修改即可平滑迁移到 OceanBase 数据库,V4.2.3_CE 及之后版本会针对 MySQL 5.7 全量功能,对 OceanBase 数据库还未兼容细节的部分、不适用的能力,逐步进行兼容或 Mock 处理。

    V4.2.3_CE 版本支持的兼容能力如下:

    • 支持数据类型 SERIAL。
    • [MySQL 8.0] 支持创建触发器时指定 IF NOT EXISTS 语法。
    • SQL 语句中支持使用 \N 代表 NULL。
    • 兼容 MySQL,update/delete ... limit 语句禁用 offset 子句。
    • 兼容 MySQL 5.7 password 函数。
    • 兼容 MySQL DROP USER IF EXISTS 语法。
    • 兼容 MySQL,用户变量标识符长度限制 64 个字符。
    • 兼容 CREATE TABLE ... [IGNORE | REPLACE] SELECT statement
    • SELECT 语句支持 STRAIGHT_JOIN
    • 支持 MySQL CREATE TABLESPACE 权限。
    • 支持授予、回收、查看 MySQL SHUTDOWN、RELOAD 权限,实际不生效。
    • DML 忽略 PRIORITY 不报错,不生效。
    • INSERT 忽略 LOW_PRIORITY、 HIGH_PRIORITY 不报错,不生效。
    • UPDATE 忽略 LOW_PRIORITY 不报错,不生效。
    • DELETE 忽略 LOW_PRIORITY、QUICK 不报错,不生效。
    • REPLACE 忽略 LOW_PRIORITY 不报错,不生效。
    • SELECT 忽略 SQL_SMALL_RESULTSQL_BIG_RESULTSQL_BUFFER_RESULTHIGH_PRIORITY 不报错,不生效。
    • 兼容 MySQL 5.7,忽略降序索引语法不报错,不生效。
    • 兼容 MySQL 5.7,忽略 CREATE TABLE 中 Column 后的 reference_definition 语法,不报错,不生效。
    • 忽略建表建索引指定的 KEY_BLOCK_SIZE option,不报错,不生效。
    • FLUSH PRIVILEGES:语法不报错,实际不适用。
    • Show Profile/Profiles:语法不报错,实际不生效。
    • SHOW FUNCTION/PROCEDURE CODE:语法不报错,实际功能未支持。
    • 支持 INFORMATION_SCHEMA.PROFILING 表结构。
    • 新增 MySQL 变量(debugdebug_syncinnodb_change_buffering_debuginnodb_compress_debuginnodb_disable_resize_buffer_pool_debuginnodb_fil_make_page_dirty_debuginnodb_limit_optimistic_insert_debuginnodb_merge_threshold_set_all_debuginnodb_saved_page_number_debuginnodb_trx_purge_view_update_only_debuginnodb_trx_rseg_n_slots_debugstored_program_cacheprofilingprofiling_history_sizeinnodb_stats_persistent)。变量不产生实际效果,可查询可设置。设置后不会报错,也不会生效,产生 Warning。
    • 兼容 MySQL 5.7 通信协议 COM_PROCESS_INFOCOM_PROCESS_KILL;支持通信协议 COM_REFRESHCOM_DEBUG,实际不生效。

多模特性

  • MySQL GIS

    OceanBase 数据库 V4.1.0 版本开始支持 GIS 数据类型及部分空间对象相关的表达式,后续逐渐增加了空间数据存储和计算分析的能力。新版本 MySQL 模式下扩展支持 PostGis_ST_GeoHash 表达式,用于计算 Geometry 的 Geohash 编码;扩展 PostGis_ST_MAKEPOINT 表达式,用于根据坐标创建 2D 和 3D 的 Geometry Point;新增支持 MySQL ST_ASGEOJSON 表达式,用于将 Geometry(WKB)按一定的格式转成 Json(Binary)。

  • JSON/XML/GIS 内存优化

    新版本对 JSON 表达式执行过程中内存占用进行了优化,对 JSON 类型进行查询操作(JSON_KEYSJSON_LENGTHJSON_SEARCH 等)时,内存占用减少至 1 倍;对 JSON 类型进行输出操作(JSON_PRETTYJSON_UNQUOTE 等)时,内存占用减少至 3 倍左右。在插入更新 XML 和输出 XML 的场景也进行了内存优化。输出 XML 操作(GetClobVal、XmlCast 等)内存占用减少到 2~3 倍左右;插入更新 XML (UpdateXml、InsertChildXml 等)时减少了不必要的解析。

    新版本同时对 GIS 类型数据输入、输出以及部分查询场景进行了内存优化。GIS 输入(st_geomfromtext/st_geomfromwkb/st_geogfromtext/geometrycollection 等)内存占用减少到 3 倍左右;GIS 输出(st_astext/st_aswkb 等)内存占用减少到 1 倍左右;查询场景(st_crosses/st_overlaps/_st_touches 等空间关系查询表达式、st_geometrytype/st_iscollection 等 GIS 属性获取表达式)也明显降低了内存放大程度。

  • GIS 空间关系计算性能优化

    新版本优化了 ST_INTERSECTS/ST_CONTAINS/_ST_COVERS/ST_WITHIN 等空间关系计算表达式的计算性能。

    • 在全量查询窗查询场景,Point 的 st_intersects 与 PG 持平,且略优于 PG;其余测试场景的平均 RT 均不到 PG 的一半,其中 Linestring 的 Intersect 用时只有 PG 的 1/5 ,相比 OceanBase 数据库历史版本均有数量级的提升。

    • 在大查询窗场景,所有场景的平均 RT 均明显优于 PG,其中 Linestring 的 Intersect 用时仅有 PG 的 1/7,且相比 OceanBase 数据库历史版本均有数量级的提升。

    • 在小查询窗场景,Contain 计算会优于 PG,其中 Point 的 Contain 用时是 PG 的 1/4 左右,Linestring Contain 是 PG 的 80%。但 Intersect 的计算性能在 Linestring 场景仅与 PG 持平,在 POINT 场景用时是 PG 的 2 倍左右。

    有关空间函数的更多信息,参见 空间函数

  • OUTROW 存储的 LOB 读写性能优化

    V4.2.3_CE 版本重点对 OUTROW 存储的 LOB 进行了性能优化。

    • Table Scan 场景,相对历史版本,新版本中小 LOB 性能可以提升近 10 倍,大 LOB 可以提升至少 2 倍。但该场景相对 INROW 仍然慢一些。
    • Point Select 场景,新版本小 LOB (8K 以下),OUTROW 的 QPS 比 INROW 低 20% 以内,中等以上大小的 LOB(32K 以上),OUTROW 的 QPS 比 INROW 低 5% 左右。在 LOB 不参与计算的场景,LOB OUTROW 存储对查询性能会更优。
    • Point Update 场景,相对历史版本,新版本 OUTROW 性能平均提升 2 倍。

    有关 OUTROW 存储的 LOB 的更多信息,参见 lob_enable_block_cache_threshold

OBKV 增强

  • OBKV 全局索引

    V4.1.0 版本开始,OBKV 支持了本地索引。新版本增加支持 OBKV 的全局索引功能,Insert、Update、Delete、insert_or_update、R...

Read more

v4.2.1_CE_BP5

24 Apr 10:21
Compare
Choose a tag to compare

Version information

Information Description
Release date April 24, 2024
Version V4.2.1_CE_BP5
Commit number ec03c25
OBServer RPM version oceanbase-ce-4.2.1.5-105000032024041915

Enhanced features

  • Compatibility with MySQL

    • A SET statement that contains the SET NAMES statement can also set other variables.
    • The information_schema.events table of MySQL is supported. #1194
  • Other optimizations

    • The [G]V$OB_SESSION view is provided to display session information and help reduce the time required in collecting processlist statistics.
    • The NETWORK_WAIT_TIME column is added to the GV$OB_SQL_AUDIT view to indicate the total amount of time spent on events of the Network class.
    • A switch is provided for controlling parallel execution of DDL statements.
    • The log_storage_compress_all parameter is provided to specify whether to compress clogs for storage, and the log_storage_compress_func parameter is provided to specify the clog compression algorithm.
    • The slog and sstable directories now can be stored in different paths on the disk.
    • The OUTROW storage performance of large object (LOB) data is improved.
    • The issue of PL cache failure is resolved.
    • Adaptive major compaction is optimized for buffer tables.
    • The statistics collection performance is improved.

Product behavioral changes

To ensure stability, the batch rescan optimization feature was disabled by default for the NESTED-LOOP JOIN (NLJ) and SUBPLAN FILTER (SPF) operators during cluster creation in OceanBase Database since V4.2.1_CE_BP2_HF1. This feature is optimized in V4.2.1_CE_BP5 and is now enabled by default. In other words, the batch rescan optimization feature is enabled by default for new tenants. In OceanBase Database of a version earlier than V4.2.1_CE_BP5, the feature is still disabled by default. You can manually enable the feature as needed.

Bug fixes

  • Fixed the issue where the query result of an SQL statement in a standalone database is inconsistent with that in a multi-node cluster. #1845
  • Improved the performance of hotspot functions in an ARM environment.
  • Fixed the issue where requests are accumulated in the queue of the sys tenant because the slog disk is used up.
  • Fixed the issue where an additional record is displayed in some views such as information_schema.tables and all_tables after a DDL operation is performed to convert a non-partitioned table into a partitioned table.
  • Fixed the issue where in the case of frequent connection and disconnection attempts, Error 4016 is returned during connection establishment when the total number of established connections reaches the specified value, because the reference count is leaked.
  • Fixed the issue where the OBServer node can be hung if the obstack command is automatically executed when requests are accumulated in the queue.
  • Fixed the issue where Error 4016 is returned when you execute the SHOW TRACE statement for a distributed execution plan after end-to-end tracing is enabled.
  • Fixed the issue where the performance deteriorates after SQL plan management (SPM) is enabled.
  • Fixed the issue where a core dump occurs if the offset exceeds INT64_MAX when the LIMIT OFFSET syntax is used in the .NET driver.
  • Fixed the issue where the memory of the CommonArray memory module leaks due to bypass import.
  • Fixed the issue where the memory of the PlJit module leaks due to exceptions.
  • Fixed the issue where a core dump occurs during parallel execution when memory allocation fails.
  • Fixed the issue of memory bloat during parallel index creation in specific scenarios.
  • Fixed the issue where Error 4344 may be returned when you back up a standby database in specific scenarios.
  • Fixed the issue where creating a standby tenant in the standby cluster will fail if case sensitivity is enabled for table names of tenants in the primary cluster.
  • Fixed the issue where the execution time is abnormal if you execute the create table if not exists statement to create an existing table immediately after the cluster is restarted.

Considerations

OceanBase Database V4.2.1_CE_BP5 fixes the issue where connection establishment fails because the reference count of session connections is leaked. We recommend that you upgrade OceanBase Database to V4.2.1_CE_BP5 as soon as possible.

版本信息

项目 描述
发布日期 2024-04-24
版本号 V4.2.1_CE_BP5
Commit 号 ec03c25
OBServer RPM 版本号 oceanbase-ce-4.2.1.5-105000032024041915

特性增强

  • MySQL 兼容性

    • 支持在同一个 SET 语句中同时包含 SET NAMES 语句和使用 SET 设置其他变量。
    • 支持兼容 MySQL 的 information_schema.events 表结构。 #1194
  • 其他优化

    • 新增 [G]V$OB_SESSION 视图展示会话信息,优化 Processlist 统计时间。
    • GV$OB_SQL_AUDIT 视图新增 NETWORK_WAIT_TIME 字段,用于展示所有 Network 类事件的总时间。
    • 新增 _parallel_ddl_control 参数用于控制是否在租户级别开启各类并行 DDL 的功能。
    • 支持通过 log_storage_compress_all 控制是否开启 Clog 存储压缩功能以及通过 log_storage_compress_func 设置 Clog 存储压缩的压缩算法。
    • 支持将 slogsstable 的目录放在不同的磁盘目录下。
    • 优化 LOB 类型数据外联存储(OUTROW)性能。
    • 优化 PL Cache 缓存失效的问题。
    • 优化 Buffer 表的自适应合并。
    • 优化统计信息收集的性能。

产品行为变更

出于稳定性因素的考虑,从 V4.2.1_CE_BP2_HF1 版本开始,新建集群时,Nested Loop join(NLJ)和 SUBPLAN FILTER(SPF)算子的 BATCH RESCAN 优化默认会被关闭。我们针对该功能进行了专项提升,在 V4.2.1_CE_BP5 版本重新打开该默认开关。V4.2.1_CE_BP5 版本开始,新建的租户默认保持 BATCH RESCAN 优化开启。升级前已存在的老租户会维持原来的配置,如需打开优化,需在对应的租户下执行 SET GLOBAL _nlj_batching_enabled = true 手动开启。

缺陷修复

  • 修复单节点与多节点查询结果不一致的问题。#1845
  • 优化 ARM 环境下的性能热点问题。
  • 修复 slog 盘满导致系统租户队列积压的问题。
  • 修复执行非分区表转分区表 DDL,会导致一些视图(如 information_schema.TABLES/ALL_TABLES)多显示一条记录的问题。
  • 修复频繁建连接/断连接场景下,引用计数泄漏导致建连接总数达到一定量后,建连接报错 4016 的问题。
  • 修复队列积压情况下自动 obstack 可能导致 observer hang 住的问题。
  • 修复开启全链路追踪后分布式执行计划 show trace 报错 4016 的问题。
  • 修复打开 SPM 后性能下降的问题。
  • 修复 .NET 驱动中使用 limit offset 时遇到 int64_max 溢出导致的 core 问题。
  • 修复旁路导入产生 CommonArray 内存模块泄漏的问题。
  • 修复异常场景下 PlJit 模块内存泄漏问题。
  • 修复分配内存失败场景下,并行执行 core 的问题。
  • 修复并行执行创建索引特定场景下内存膨胀的问题。
  • 修复特定场景下备库备份可能出现 4344 报错的问题。
  • 修复主集群租户设置了区分表名大小写,备集群同步创建备租户会失败的问题。
  • 修复集群重启后,立即执行 create table if not exists 创建已经存在的表,执行时间异常的问题。

注意事项

V4.2.1_CE_BP5 版本修复了集群 session 连接数引用计数泄漏导致不能新建连接的问题,请尽快升级到 V4.2.1_CE_BP5 版本。

v4.3.0_CE_BETA

28 Mar 09:39
Compare
Choose a tag to compare

Version information

Information Description
Release date March 28, 2024
Version V4.3.0_CE_BETA
Commit number 0193a34
Release note The Beta version resolved most of the issues and is becoming more and more stable. However, there may still be some minor issues or errors that need to be addressed in the final stable release, so we recommend that you use this version in a testing environment.

Overview

OceanBase Database V4.3.0 is released to accommodate typical analytical processing (AP) scenarios in addition to transaction processing (TP) and lightweight AP scenarios. It provides a columnar engine based on the log-structured merge-tree (LSM-tree) architecture to implement integrated row- and column-based data storage. Powered by a new vectorized engine that is based on column data format descriptions and a cost model that is based on columnar storage, this version supports efficient processing of wide tables. This greatly improves the query performance in AP scenarios while ensuring the performance in TP business scenarios. Moreover, the new version includes a materialized view feature, which pre-evaluates and stores view query results to enhance real-time query performance. You can use materialized views for quick report generation and data analytics. The kernel of this version supports online DDL and tenant cloning features, optimizes the parallel DML (PDML) and node restart performance, and improves the bypass import efficiency for data of large object (LOB) types. It also supports AWS Simple Storage Service (S3) as the backup and restore media, optimizes system resource usage, and provides features such as index usage monitoring and local import to improve the ease of use of the system. We recommend that you use this version in hybrid load scenarios such as complex analytics, real-time reports, real-time data warehousing, and online transactions.

Key features

Key AP features

  • Columnar engine

    Columnar storage is crucial for AP databases in scenarios involving complex analytics or ad-hoc queries on a large amount of data. A columnar storage differs from a row-based storage in that it physically arranges data in tables based on columns. When data is stored in columnar storage, the engine can scan only the column data required for query evaluation without scanning entire rows in AP scenarios. This reduces the usage of I/O and memory resources and increases the evaluation speed. In addition, columnar storage naturally provides better data compression conditions to achieve a higher compression ratio, thereby reducing the storage space and network bandwidth required.

    However, common columnar engines are implemented generally based on the assumption that the data organized by column is static without massive random updates. In the case of massive random updates, system performance issues are unavoidable. The LSM-Tree architecture of OceanBase Database can resolve this problem by separately processing baseline data and incremental data. Therefore, OceanBase Database V4.3.0 supports the columnar engine based on the current architecture. It implements columnar storage and rowstores on the same OBServer node based on a single set of code and architecture, ensuring both TP and AP query performance.

    The columnar engine is optimized in terms of optimizer, executor, DDL processing, and transaction processing modules to facilitate AP business migration and improve ease of use in the new version. Specifically, a columnar storage-based new cost model and a vectorized engine are introduced, the query pushdown feature is extended and enhanced, and new features such as the Skip Index attribute, new column-based encoding algorithm, and adaptive compactions are provided.

    You can flexibly set a table in your business system as a row-based store table, columnar storage table, or row/column redundant table based on the load type.

  • New vectorized engine

    OceanBase Database has implemented a vectorized engine based on uniform data descriptions in earlier versions, which obviously improves the performance in contrast to non-vectorized engines but is incompetent in deep AP scenarios. OceanBase Database V4.3.0 implements vectorized engine 2.0 that is based on column data format descriptions. This avoids memory use, serialization, and read/write overheads caused by ObDatum maintenance. Based on the column data format descriptions, OceanBase Database V4.3.0 also reimplements more than 10 common operators such as HashJoin, AGGR, HashGroupBy, and Exchange (DTL Shuffle), and about 20 MySQL expressions including relational operation, logical operation, and arithmetic operation expressions. Based on the new vectorized engine, OceanBase Database will implement more operators and expressions in later V4.3.x versions to achieve higher performance in AP scenarios.

  • Materialized views

    The materialized view feature is introduced since OceanBase Database V4.3.0. This feature is a key feature for AP business scenarios. It pre-evaluates and stores the view query results to improve the query performance and simplify the query logic by reducing real-time evaluations. This feature applies to quick report generation and AP scenarios.

    A materialized view stores query result sets to improve the query performance and depends on the data in the base table. When data in the base table changes, the data in the materialized view must be updated accordingly to ensure synchronization. Therefore, this version introduces a materialized view refresh mechanism, which supports two strategies: complete refresh and fast refresh. In a complete refresh of a materialized view, the system re-executes the query statements corresponding to the materialized view and overwrites the original query result sets with new ones. Complete refreshes apply to scenarios with small amounts of data. In a fast refresh, the system needs to process only the data changed since the last refresh. To implement accurate fast refreshes, OceanBase Database provides the materialized view log feature, which is similar to Oracle Materialized View Log (MLOG). The incremental data updates in the base table are logged to ensure that materialized views can be fast refreshed. Fast refreshes apply to business scenarios with large amounts of data and frequent data changes.

Kernel enhancements

  • Enhancement of the row-based cost estimation system

    As the OceanBase Database version evolves, more cost estimation methods are supported for optimizers. For row-based cost estimation by each operator, a variety of algorithms, such as storage-layer cost estimation, statistics cost estimation, dynamic sampling, and default statistics, are supported. However, no clear cost estimation strategies or control measures are available. OceanBase Database V4.3.0 restructures the row-based cost estimation system. Specifically, it prioritizes cost estimation strategies based on scenarios and provides methods such as hints and system variables for manually intervening in the selection of a cost estimation strategy. This version also enhances the predicate selectivity and number of distinct values (NDV) calculation framework to improve the accuracy of cost estimation by optimizers.

  • Enhancement of the statistics feature

    OceanBase Database V4.3.0 improves the statistics feature in terms of functionality, statistics collection performance, compatibility, and ease of use. Specifically, this version restructures the offline statistics collection process to improve the statistics collection efficiency, and optimizes the statistics collection strategies. By default, OceanBase Database of this version automatically collects information about index histograms and uses derived statistics. This version ensures transaction-level consistency of statistics collected online. It is compatible with the DBMS_STATS.COPY_TABLE_STATS procedure of Oracle to copy statistics and compatible with the ANALYZE TABLE statement of MySQL to support more syntaxes. Moreover, this version provides a command to cancel statistics collection, supports statistics collection progress monitoring, and enhances the ease of maintenance. It also supports parallel deletion of statistics.

  • Adaptive cost model

    In earlier versions of OceanBase Database, the cost model uses constant parameters evaluated by internal servers as hardware system statistics. It uses a series of formulas and constant parameters to describe the execution overhead of each operator. In actual business scenarios, different hardware environments can provide different CPU clock frequencies, sequential/random read speeds, and NIC bandwidths. The differences may contribute to cost estimation deviations. Due to the deviations, the optimizer cannot always generate the optimal execution plan in different business environments. This version optimizes the implementation of the cost model. The cost model can use the DBMS_STATS package to collect or set system statistics parameters to adapt to the hardware environment. The DBA_OB_AUX_STATISTICS view is provided to display the system statistics parameters of the current tenant.

  • Fixing of session variables for function indexes

    When a function index is created on a table, a hidden virtual generated column is added to the table and defined as the index key of the function index. The values of the virtual generated column are stored in the index table. The results of some built-in system functions are affected by session variables. The evaluation result of a function varies based on the values of session variables, even if the input arguments are the same. When a function index or generated column is created in this version, the dependent sessi...

Read more

v4.2.2_CE_BP1

13 Mar 11:27
Compare
Choose a tag to compare

Version information

Information Description
Release date March 13, 2024
Version V4.2.2_CE_BP1
Commit number 083a68a
OBServer RPM version oceanbase-ce-4.2.2.1-101000012024030709

Overview

  • This release addressed several internal code compatibility issues. To upgrade a cluster from V4.2.2_CE or V4.2.2_CE_HF1 to a version higher than V4.2.2_CE_BP1, you need to upgrade it to V4.2.2_CE_BP1 first.

Bug fixes

  • Fixed the issue where during the current execution of transfer, medium compaction, and backup, if an exception occurs, such as OSS write failure, Error 4016 might be reported during physical restore.
  • Fixed the issue that could cause core dump on OBServer nodes when creating and switching sessions frequently.
  • Fixed the issue that could cause core dump on OBServer nodes due to memory allocation problems in parallel column deletion scenarios.

版本信息

项目 描述
发布日期 2024-03-13
版本号 V4.2.2_CE_BP1
Commit 号 083a68a
OBServer RPM 版本号 oceanbase-ce-4.2.2.1-101000012024030709

发版目的

  • 修复若干内部代码兼容性问题,已经部署 V4.2.2_CE 或 V4.2.2_CE_HF1 版本的集群,升级更高版本时,需经停 V4.2.2_CE_BP1 版本。

缺陷修复

  • 修复在 Transfer、Medium Compaction 和备份操作并发执行期间,遇到写入 OSS 失败等可重试错误的异常场景时,可能会导致物理恢复数据报错 4016 的问题。
  • 修复多次创建并切换 Session 时,可能导致 OBServer Core 的问题。
  • 修复在并行删除列场景下,可能由于内存分配问题导致 OBServer Core 的问题。

v4.2.1_CE_BP4

05 Mar 08:12
Compare
Choose a tag to compare

Version information

Information Description
Release date March 5, 2024
Version V4.2.1_CE_BP4
Commit number 3246b00
OBServer RPM version oceanbase-ce-4.2.1.4-104000052024022918

Enhanced features

  • The overwrite feature is now supported for OBKV Batch Put. To use this feature, you must first upgrade your client to the latest version.
  • The manual partition transfer now can be cancelled.
  • The query performance is now improved for query statements that contain multiple MIN or MAX functions.
  • The index status now can be determined based on the COMMENT field in the information_schema.STATISTICS view.

Product behavioral changes

  • The TENANT keyword is changed from a required parameter to an optional one in the table-level restore statement.
  • The max_syslog_file_count parameter is changed to control the total number of log files of all types.

Bug fixes

版本信息

项目 描述
发布日期 2024-03-05
版本号 V4.2.1_CE_BP4
Commit 号 3246b00
OBServer RPM 版本号 oceanbase-ce-4.2.1.4-104000052024022918

特性增强

  • OBKV Batch Put 现支持覆盖写功能,使用该功能前需要升级到最新版本的客户端。
  • 手动迁移分区功能支持 Cancel。
  • 优化查询语句中包含多个 MINMAX 函数时的查询性能。
  • 支持通过 information_schema.STATISTICSCOMMENT 字段来判断索引状态。

产品行为变更

  • 表级恢复命令调整 TENANT 关键字为可选。
  • max_syslog_file_count 调整为控制所有类型的 Log 总量。

缺陷修复

v4.2.2_CE_HF1

28 Feb 09:57
Compare
Choose a tag to compare

v4.2.1_CE_BP3_HF2

05 Feb 08:44
Compare
Choose a tag to compare

Version information

Information Description
Release date February 5, 2024
Version V4.2.1_CE_BP3_HF2
Commit number 73d0496
OBServer RPM version oceanbase-ce-4.2.1.3-103020042024020317

Bug fixes and improvements

Considerations

  • When using the bypass import feature to import LOB data that exceeds 4 KB, a transfer event could result in import failure. Therefore, we recommend that you temporarily disable the transfer feature.

  • When using the bypass import feature to import LOB data that exceeds 4 KB, if a leader switchover occurs during the import process, the system will attempt to perform the import operation again.

版本信息

项目 描述
发布日期 2024-02-05
版本号 V4.2.1_CE_BP3_HF2
Commit 号 73d0496
OBServer RPM 版本号 oceanbase-ce-4.2.1.3-103020042024020317

发版目的

注意事项

  • 使用旁路导入功能导入超过 4 KB 的 LOB 数据时,如果发生 Transfer,则会导致导入失败,建议使用时临时关闭 Transfer 功能。

  • 使用旁路导入功能导入超过 4 KB 的 LOB 数据时,如果导入过程中发生切主,则系统会进行重试。

v4.2.1_CE_BP3_HF1

25 Jan 07:51
Compare
Choose a tag to compare

Version information

Information Description
Release date January 25, 2024
Version V4.2.1_CE_BP3_HF1
Commit number 37a4c62
OBServer RPM version oceanbase-ce-4.2.1.3-103010052024011916

Bug fixes

版本信息

项目 描述
发布日期 2024-1-25
版本号 V4.2.1_CE_BP3_HF1
Commit 号 37a4c62
OBServer RPM 版本号 oceanbase-ce-4.2.1.3-103010052024011916

缺陷修复

v4.2.2_CE

17 Jan 13:42
Compare
Choose a tag to compare

Version information

Information Description
Release date January 17, 2024
Version V4.2.2_CE
Commit number fac02c6
OBServer RPM version oceanbase-ce-4.2.2.0-100000192024011915

Overview

OceanBase Database V4.2.2_CE is a follow-up to V4.2.1_CE. This version comes with enhancements to the database kernel, with a restructuring of the row-based cost estimation system and statistics collection mechanism. It also introduced support for lateral derived tables, order preservation for paging queries, and DBLink-based remote UDF calls to enhance MySQL compatibility. Additionally, OceanBase Database V4.2.2_CE now supports GIS, XML, and JSON data types to expand the multi-mode feature. This version also added support for SQLSTAT, TIME MODEL, and manual partition transfer to improve the ease of use. Furthermore, it optimized system resource usage by reducing temporary index space occupation and supporting OBKV RPC compression. OceanBase Database V4.2.2_CE also improved the performance of minimum specification databases and enhanced system stability.

Key features

Kernel enhancements

  • Enhancement of the row-based cost estimation system

    As OceanBase Database evolves, more cost estimation methods are supported for optimizers. Currently, OceanBase Database supports a variety of algorithms for row-based cost estimation by each operator, such as storage-layer cost estimation, statistical estimation, dynamic sampling, and default statistics. In OceanBase Database V4.2.2_CE, the row-based cost estimation system was restructured, prioritizing cost estimation strategies based on specific use cases and introducing tools like hints and system variables for manual intervention in strategy selection. Additionally, the new version further enhanced the framework for calculating predicate selectivity and number of distinct values (NDV), thereby improving the accuracy of optimizers' cost estimation.

  • Enhancement of the statistics feature

    On the basis of V4.2.1_CE, V4.2.2_CE further improved the statistics feature in terms of statistics collection performance, compatibility, and ease of use. Specifically, this version restructured the offline statistics collection process, improved the statistics collection efficiency, and optimized the statistics collection strategy. The system now automatically collects index histograms by default, derives statistics to ensure transactional consistency during online statistical gathering, and is compatible with the ANALYZE TABLE feature of MySQL to support more syntaxes. This version now provides a command to cancel statistical collection, supports progress monitoring for statistics gathering, and improves operational usability. It also provides the capability for parallel deletion of statistical data.

  • Optimization of large IN queries

    Currently, in scenarios where the right side of the IN predicate contains many constants (referred to as "large IN query"), there is a noticeable consumption of CPU and memory during the hard parsing stage. To address these large IN queries, V4.2.2_CE implemented a new query range extraction algorithm. Moreover, when the number of values in the IN list exceeds 1000, OceanBase Database triggers a rewrite from the IN list to the VALUES table to reduce resource consumption and improve performance.

  • Enhancement of the execution engine

    OceanBase Database V4.2.2_CE implemented a series of optimizations at the SQL execution layer, such as enhancements to recursive CTE searches, the integration of window functions with automatic memory management, improvements to adaptive hash group by for data skew optimization, the refinement of hash-based distinct aggregate strategy, and optimizations for the adaptive hash group by strategy. These enhancements help to boost the performance of SQL execution and increase system stability.

  • Optimization of the recompilation logic in PL cache

    After a stored procedure is compiled as a shared library, it can be used by multiple threads. However, if the dependent objects are changed, the shared library may become invalid and must be recompiled. OceanBase Database V4.2.2_CE reviewed and refined the recompilation scenarios. It implemented a series of logic optimizations in terms of temporary table matching, dependency information collection for static SQL statements, and DDL operations on tables, to avoid recompilation when cached objects in the PL cache become invalid.

  • Persistence of PL compilation results

    In previous versions, the compiled PL functions and procedures were retained in the PL cache, which risked eviction under tight memory conditions. This meant that the compilation results could be lost after a system restart and a recompilation was required in distributed environments. Consequently, PL statements missing the cache would initiate an low-level virtual machine (LLVM) compilation, incurring CPU usage. However, starting from OceanBase Database V4.2.2_CE, the compiled PL functions and procedures are now persistently stored in system tables. As long as no DDL operations invalidate the cache, these functions and procedures require compilation only once and can be reused after a restart or in a distributed environment.

  • Embedding of session variables for function indexes

    When a function index is created, a hidden virtual generated column is added to the primary table, defined as the index key of the function index, and then the values of this column are stored in the index table. The session variables can influence the output of some built-in system functions, resulting in different outcomes despite identical input parameters. To enhance the reliability of generated columns and function indexes, the latest release ensures that any session variables the function depends on are embedded directly into the index or generated column's schema. Consequently, when calculating values for these columns, the system employs these embedded, unchanging values, thereby rendering the current session's variable values irrelevant. In OceanBase Database V4.2.2_CE, system variables that can be embedded include timezone_info, nls_format, nls_collation, and sql_mode.

  • OBCDC allowlists and blocklists

    OceanBase Change Data Capture (CDC) already supports tenant-level log synchronization. Starting from OceanBase Database V4.2.2_CE, database-level and table-level log synchronization are supported. The system now supports the configuration of allowlists and blocklists using simple regular expressions to accommodate scenarios where users require data synchronization for only a subset of tables.

Compatibility with MySQL

  • Lateral derived tables

    Lateral derived tables are a special type of derived tables that can reference columns from preceding tables within the same FROM clause. This makes SQL statements easier to read and write, and reduces repeated data scanning and calculation, thereby improving the performance of SQL execution.

  • Order preservation for paging queries

    Due to factors such as plan selection and parallel execution, the output results of the LIMIT OFFSET clause are unstable for most databases. To ensure a stable and ordered output, it is necessary to add an ORDER BY clause to the outer layer of each SQL statement. Although native MySQL Database does not guarantee an ordered result set, many of its queries still produce ordered results. To avoid extensive restructuring for paging queries during data migration from a MySQL database, OceanBase Database has introduced a feature that preserves order in paging queries. However, there may be some performance degradation compared with the unordered behavior, particularly with large data volumes. For business scenarios that require order preservation, you can consult OceanBase Technical Support to assess the impact on performance. If the impact is acceptable, enable this feature by using a parameter.

  • Online DDL operations for integer type expansion

    In the context of a primary key column, partitioning key column, index column, column referenced by a generated column, or a column with a CHECK constraint, there may be a need to change its integer type to accommodate a larger value range, such as from INT to BIGINT. In OceanBase Database V4.2.1_CE, this type of change was performed using an offline DDL operation with doublewrites, resulting in table locks that blocked read and write access. However, starting from V4.2.2_CE, this change is implemented using an online DDL operation without affecting business writes.

  • Local import from the client

    Prior to V4.2.2_CE, OceanBase Database supported file import from the server, Network File System (NFS), and Object Storage Service (OSS) through SQL import in either standard or bypass mode. However, importing files from the client side required the use of tools like OBLOADER and could not be done directly using SQL statements. To facilitate data developers in performing local import tests and to address the issue of inconvenient data import due to the inability to log on to the server in cloud environments, V4.2.2_CE added new support for client-side local data import (LOAD DATA LOCAL INFILE). This feature allows for local file import through streaming file processing.

  • Support for output parameters in prepared statements

    In OceanBase Database V4.2.2_CE, executing the CALL PROCEDURE statement via the prepared statement (PS) protocol in MySQL mode now supports stored procedures with output parameters.

  • Improvement in communication protocol

    OceanBase Database V4.2.2_CE now supports the MySQL communication protocol command COM_SET_OPTION for specifying connection-level options such as MYSQL_OPTION_MULTI_STATEMENTS_ON and `MY...

Read more