V4.3.2 Beta
Version information
- Release date: July 16, 2024
- Version: V4.3.2 Beta
- RPM number: oceanbase-4.3.2.0-100000442024071321
Overview
OceanBase Database V4.3.2 is a performance-enhanced version designed for analytical processing (AP) workloads. This release includes comprehensive improvements in data reading, data distribution, data computation, vectorized processing, and plan selection, bringing an overall performance boost of 10%-15% in AP benchmark tests. In addition, this version introduces the roaring bitmap data type and associated computation expressions, offering a better choice for large data set operations and deduplication scenarios. It also enhances the incremental direct load functionality, improves full direct load performance, and extends support for Parquet external tables, accelerating the processing speed of large-scale data. As an integrated database, the new version has also provides scenario-specific parameter templates for express oltp, complex oltp, olap, htap, and kv scenarios, ensuring the initial configuration is suitable for each business type with the help of deployment tools. Additionally, the new version incorporates various compatibility enhancements and user experience improvements from the V4.2.x series, along with performance improvements for transactional processing (TP) SQL, aiming to meet the demands of various application scenarios.
Key features
Kernel enhancement
Roaring bitmap
As the era of big data evolves, enterprises are increasingly looking to mine and analyze user data. Roaring bitmap, known for its space-saving and computational efficiency, plays a significant role in scenarios such as user profiling, personalized recommendations, and precision marketing. Starting from OceanBase Database V4.3.2, the MySQL mode supports the roaring bitmap data type, enhancing the performance of large-scale data set computations and deduplication by storing and operating on a set of unsigned integers. To cater to multidimensional analysis needs, this version includes support for over 20 expressions related to cardinality calculation, set operations, bitmap evaluations, bitmap construction, bitmap output, and aggregate operations.
Table-level overwrite
In data warehousing scenarios, tasks such as periodic data refresh, transformation, and cleansing often need data to be overwritten. OceanBase Database V4.3.2 introduces a table-level overwrite feature (
INSERT OVERWRITE), which atomically clears old data and writes new data into the table. By utilizing full direct load capabilities,INSERT OVERWRITEoffers high execution performance. V4.3.2 supports the commandINSERT OVERWRITE tablename SELECT * FROM tablenamebut does not yet support partition-level overwrites. This functionality will be available in future versions.Enhanced incremental direct load
Starting from V4.3.1, incremental direct load is supported as an experimental feature, with some limitations such as not supporting the import of outrow LOB data and only supporting incremental direct load with
inc_replaceload_mode(equivalent toreplacesemantics). In V4.3.2, the capability to incrementally import outrow LOB data through direct load has been added. Additionally, theload_modehas been expanded to include the valueinc, which defaults toinsertsemantics. When theignorekeyword is specified in SQL, it behaves withignoresemantics. This feature is now released as an official one.Enhanced external table functionality
OceanBase Database has supported external tables for CSV files for some time. However, as AP businesses gradually expand, there has been a widespread demand for reading external data sources in Parquet format in data lake scenarios. Starting from V4.3.2, OceanBase Database now supports Parquet files in external tables. This allows users to import data from these files into OceanBase internal tables, or directly use external tables for federated query analysis across data sources. Additionally, to ensure the files scanned by external tables are up-to-date, the new version introduces an automatic refresh feature for file directories. When creating an external table, users can specify the file list refresh method (manual, real-time, or periodic) through the
AUTO_REFRESHoption, and manage scheduled refresh tasks using theDBMS_EXTERNAL_TABLE.REFRESH_ALL_TABLE(interval int) system package subprogram.Vectorized engine enhancements
V4.3.0 has supported the new vectorization engine, and V4.3.2 further expanded support for operators and expressions, including
Hash Set-related operators,WindowFunctionoperators,MergeDistinctoperators, as well as therepeat,ceil, andfloorexpressions. This further enhances the computing performance in AP scenarios.Scenario-specific parameter templates
OceanBase Database, as an integrated database, supports various business types, such as express OLTP, complex OLTP, OLAP, HTAP, and KV. A single set of default system parameters cannot effectively cater to all scenarios. For example, the default value of
ob_query_timeoutis 10 seconds, which is not suitable for OLAP businesses. Therefore, starting from V4.3.2, OceanBase Database has identified the optimal configurations for several key parameters based on different business scenarios. In the future, tools like OCP and obd will also be used to initialize these parameters for specific business scenarios.Enhanced query parsing capabilities
When an SQL statement contains a large number of
INLIST,AND/OR, andUNIONoperations, it can generate exceedingly deep syntax trees during parsing. This often leads to excessive memory consumption, stack overflow issues, and prolonged processing times. The new version addresses these challenges by rewriting the parsing implementation for such extreme scenarios, thereby reducing resource usage during the parsing phase. This enhancement not only improves the stability of executing unusually complex SQL queries but also accelerates the SQL parsing performance.Enhanced query rewrite capabilities
OceanBase Database V4.3.2 improved the optimizer's query rewriting logic in several ways, such as:
Improved expression normalization: In previous versions, various expressions would be normalized in the resolver parsing phase, such as rewriting A and (A or B) into A. However, it did not cover the non-standard expressions generated in the SQL rewriting phase. The new version introduces an expression normalization process in the rewriting phase to ensure that expressions are rewritten to the simplest form.
Conditional aggregate function rewrite: In queries with expressions like
select c1, sum(case when c2 = 0 then c3 else 0 end) ,sum(case when...)...,... from t1 group by c1, where the aggregation target is dynamically determined based on runtime branch conditions, we refer to them as conditional aggregate functions. The new version supports rewriting these conditional aggregate functions by pushing the aggregate function into the selection target of each branch, reducing the computations forcase whenexpressions and aggregate functions. This enhancement significantly improves execution performance in relevant scenarios.Multiple
MIN/MAXrewrites: In ascalar group byquery, if the query contains onlyMIN/MAXaggregate functions and the columns have indexes, the query can be rewritten asORDER BY xxx LIMIT 1. This uses the index order to bypassORDER BYand pushesLIMIT 1to thetable scan, reducing data reads and sorting. In previous versions, queries with multipleMIN/MAXfunctions involved full table scans. The new version, however, rewrites these into separate subqueries, each directly fetching the maximum or minimum value from the index. This avoids full table scans and sorting, effectively optimizing query performance.Rewriting the
UNIONconstant toValues Table: In practical business scenarios, multipleUNION ALLcombinations are used to represent a constant table. This might lead to high CPU and memory consumption if there are a large number of subqueries. The new version rewrites the constant typeUNION ALL/UNIONintoValues Tablequeries, significantly reducing resource consumption during the hard parsing phase.SEMI JOINsplit optimization: InEXISTSorINsubqueries with multiple table joins and no join conditions, the execution plan may involve costly Cartesian products. The new version supportsSEMI JOINsplitting for tables without join conditions, avoiding the overhead of Cartesian products.
Plan selection optimization
The previous versions of OceanBase Database implemented a new query range extraction logic, broadening the scenarios for predicate pushdown. This enhancement enabled more precise range extraction for vectorized predicates and addressed issues of memory amplification associated with the older Query Range mechanism. Building upon this foundation, V4.3.2 introduces modifications to the method for generating query ranges from
NOT INexpressions, thereby improving the performance of range extraction. It also facilitates range graph pruning, which reduces the total number of final query ranges extracted and curbs memory consumption. The update extends support for index hints, allowing for specific instructions like/*+index(t1 k1 1)*/to limit query range extraction solely to the first column of thek1index. Furthermore, the new version embracesinteresting orderingindex path pruning strategies and incorporates optimizations such as recalculatingLIMIT, tackling performance issues inORDER BY LIMITscenarios that previously arose from suboptimal plan selection.Compatibility version control for product behaviors
To reduce potential issues caused by behavior changes in new versions, OceanBase Database V4.3.2 introduces a compatibility version control feature for product behaviors. This feature uses the system variables
ob_compatibility_versionandob_security_versionto control whether general behavior changes (from scenarios with no errors to error scenarios) and security-related changes (from privilege granted to privilege denied) take effect. These variables determine which OceanBase version's behavior or security features a tenant will be compatible with, using values such as "4.3.2.0" that correspond to release versions. For example, if a feature's behavior changes in V4.3.3, setting the variable to 4.3.2.0 retains the previous behavior, while setting it to 4.3.3.0 adopts the new behavior. Typically, the version number is not automatically increased during an upgrade. To utilize new version behaviors, users need to update the version number after understanding and testing the new behaviors. This feature is designed to manage future behavior changes and cannot handle changes in previously released versions.In V4.3.2, product behaviors controlled by
ob_compatibility_versionincludes:- When
ob_compatibility_control = MYSQL5.7, the behavior ofREPLACE('abd', '', null)is changed from being compatible with MySQL 8.0 to being compatible with MySQL 5.7. - The
offsetin the limit clause ofUPDATE/DELETEstatements is disabled. - If a projection item is a single
null, the returned header will be changed toNULL. - The user variable is limited to a maximum length of 64 characters.
Product behaviors controlled by
ob_security_versioninclude:- Privilege control for
OutlineandSequence. CREATE TABLESPACEprivileges.
- When
Multi-model features
GIS enhancements in Oracle mode
In OceanBase Database V4.3.2, the Oracle mode introduces following GIS-related functionalities:
Spatial index: Supports creating spatial indexes using
CREATE INDEX. TheSRIDfor spatial index columns must be specified when creating the table.Functions: Added the
SDO_RELATEexpression to determine the spatial relationship between two geometric objects. Added theSDO_GEOM.SDO_DISTANCEmember function to calculate the minimum Earth surface distance between two geometric objects.
Optimization of GIS spatial relationship calculation performance
The new version optimizes the performance of spatial relationship expressions such as ST_INTERSECTS
ST_INTERSECTS,ST_CONTAINS,_ST_COVERS, andST_WITHIN.- In full-query window scenarios, the performance of
ST_INTERSECTSfor points is on par with PostgreSQL and slightly outperforms it. In other scenarios, the average response time is less than half of PostgreSQL's. Notably, the intersect operations forlinestringtake only 1/5 of PostgreSQL's time, showing a significant improvement over previous versions of OceanBase Database. - In large query window scenarios, the average response time for all scenarios significantly surpasses PostgreSQL. Specifically, the intersect operations for
linestringtake only 1/7 of PostgreSQL's time, showing a substantial improvement over previous versions of OceanBase Database. - In small query window scenarios, the contain calculation outperforms PostgreSQL, with the contain operations for
pointtaking about 1/4 of the time of PostgreSQL, and forlinestringcontain about 4/5 of PostgreSQL's time. However, intersect operations perform on par with PostgreSQL forlinestringscenarios, and take roughly twice the time of PostgreSQL for point scenarios.
- In full-query window scenarios, the performance of
Optimization of read/write performance for LOBs stored in OUTROW
OceanBase Database V4.3.2 optimizes the read/write performance for LOBs stored using the OUTROW method.
- In the table scan scenario, the new version improves small LOB performance by nearly 10 times and large LOB performance by at least 2 times compared with previous versions. However, it remains slower than INROW in these scenarios.
- In the point select scenario, for small LOBs (less than 8K), OUTROW QPS is 20% lower than INROW. For larger LOBs (above 32K), OUTROW QPS is about 5% lower than INROW. When LOBs are not involved in computations, OUTROW storage offers better query performance.
- In the point update scenario, OUTROW performance has improved on average by 2 times compared with previous versions.
Compatibility with MySQL
Distinguishing between MySQL 5.7/8.0 compatibility versions
There are behavioral conflicts between MySQL 5.7 and 8.0 in some scenarios. For example, the output of
replace('a', '', null)differs between these two versions. OceanBase Database V4.3.2 introduces a tenant-level initialization variableob_compatibility_controlto specify whether to be compatible with MySQL 5.7 or 8.0 when such conflicts arise. This setting cannot be changed after the tenant is created. Both the MySQL and Oracle modes can use the superset of features from MySQL 5.7/8.0 where no behavioral conflicts exist.Union Distinct RCTE
MySQL 8.0 introduced support for recursive Common Table Expressions (CTEs) with both Recursive UNION ALL and Recursive UNION DISTINCT functionalities. Starting from V3.2.3, OceanBase Database has supported Recursive UNION but was initially limited to Recursive UNION ALL. V4.3.2 extends compatibility to include MySQL's Recursive UNION DISTINCT feature, ensuring the uniqueness of output data. Additionally, this version enhances the Recursive UNION ALL functionality by enabling data writing to disk when memory is insufficient.
Optimization for auto-increment column leader switchover
Starting from V4.x, OceanBase Database supports the creation of auto-increment columns in ORDER mode to better align with MySQL’s behavior. However, in versions prior to V4.3.2, a leader switchover could still cause value hopping in auto-increment columns. Considering that many leader switchover scenarios are initiated by users as part of regular processes rather than being exceptional situations, the new version has been optimized to maintain the continuity of auto-increment columns during intentional leader switchover, thereby reducing the probability of value hopping in auto-increment columns.
Decreasing the auto-increment value
Prior to V4.3.2, OceanBase Database only supported increasing the
AUTO_INCREMENTvalue throughALTER TABLE, not decreasing it, which was not fully compatible with MySQL's behavior. The new version now allows decreasing theAUTO_INCREMENTvalue. If the new value is greater than the current maximum value in the column, the setting is successful and takes effect. If the new value is less than or equal to the current maximum value, it can still be set, butAUTO_INCREMENTwill automatically adjust to the next value after the current maximum value.SERIAL data type
Added the
SERIALdata type as an alias forBIGINT UNSIGNED NOT NULL AUTO_INCREMENT UNIQUE. It represents an auto-incrementing large integer suitable for use as a primary key in a table.Additional support for MySQL communication protocol commands
Compatible with MySQL 5.7 communication protocol commands
COM_PROCESS_INFOandCOM_PROCESS_KILL.
Compatibility with Oracle
DBMS_SCHEDULER enhancements
In V4.3.2, four new features have been added to the existing
DBMS_SCHEDULER:JOB CLASSfeature: ProvidesCREATE_JOB_CLASSandDROP_JOB_CLASSsubprograms to create and deleteJOB CLASS. It also supports modifyingJOB CLASSattributes and bindingJOBandJOB CLASSusing subprograms likeSET_ATTRIBUTEandCREATE JOB.PURGE LOGfeature: Offers thePURGE_LOGsubprogram to clearJOBlogs for a specified time period.STOP JOBfeature: Provides theSTOP_JOBsubprogram to terminate a runningJOB, allowing for management during exceptions.- Optimized
JOBrouting policy: Supports setting theJOBrouting policy using theSET_ATTRIBUTEsubprogram. Ifinstance_idis not specified,JOBis executed on the primary zone by default. Ifinstance_idis set to a specific zone,JOBis executed there. If set toRANDOM,JOBis routed randomly. ConfiguringJOBto route to the leader node reduces RPC overhead and improves execution performance.
UTL_RECOMP package
Oracle's
UTL_RECOMPsystem package, a utility for recompiling database objects, is now used in OceanBase Database's Oracle mode to check object validity after database upgrades. It supports recompilation of entities such asPACKAGE,PROCEDURE,FUNCTION,TYPE, andTRIGGER, facilitating post-upgrade checks on object validity. Due to potential high I/O operations during execution, it is only available for SYS users.DBMS_PROFILER package
OceanBase's PL compatibility with Oracle has been improved, supporting the PL Debug feature for program troubleshooting, but lacked effective means for performance issue analysis. Following Oracle's method for performance analysis, OceanBase Database V4.3.2 supports the
DBMS_PROFILERsystem package. This enhances performance profiling mechanisms, records finer execution times, and accurately identifies the performance of each PL line to effectively diagnose runtime performance issues.DBLink synonyms
Earlier versions already supported the creation of synonyms for DBLink objects; however, they did not allow the use of these synonyms in PL variable declarations. V4.3.2, now facilitates the behavior of defining variable types using synonyms for DBLink objects within PL, enhancing the compatibility with Oracle. However, this feature is not applicable to PL parameter lists.
Proxy user
In business operations, it is common to temporarily share production account credentials with third-party vendors for maintenance or upgrades. Traditionally, after such tasks, a series of security measures, like revoking access or resetting passwords, is required. However, starting with V4.3.2, compatibility with Oracle's Proxy User functionality has been introduced. This feature allows an authorized user, Y, to act as a proxy for production account X without knowing X's password. Once the task is completed, simply removing user Y or revoking proxy privileges is sufficient. This streamlines account maintenance and enhances overall security.
SELECT ... FOR UPDATE supports hierarchical queries
Previous versions reported an error when using
START WITH ... CONNECT BYinSELECT ... FOR UPDATEstatements. The new version supports this scenario.
Performance enhancements
Performance improvements in typical AP scenarios
V4.3.2 introduces comprehensive optimizations for data block prefetching, vectorized batch processing, filter pushdown, comparison calculation, aggregation calculation, DTL shuffle, and monotonicity filters. Under a benchmark testing scenario with 100 GB of data, this has led to an approximate 10% to 15% improvement in performance across various AP scenarios, including TPCH, TPCDS, and ClickBench, compared with V4.3.1.
Performance improvements in full direct load scenarios
In full direct load scenarios, the new version improves performance by reducing column type conversion operations during data loading, lowering CPU usage for statistics collection, removing the primary key generation logic on the
SELECTside ofINSERT INTO SELECT, and disablingsum skip indexby default for column storage (which aggregatesSUMvalues for specified columns within a storage layer range). Additionally, by disabling micro-block verification (setting themicro_block_merge_verify_levelparameter to0), the direct loading performance improves by approximately 20%.Improved rewriting of IN/EXISTS subqueries
Prior to V4.3.2, OceanBase Database did not support rewriting
IN/EXISTSsubqueries withinSELECTclauses into joins. For example, in a query likeselect case when c1 in (select c1 from t2) then 1 else 0 end from t1;, the optimizer would not rewrite it into a join, leading to repeated scans of the subquery and suboptimal performance. The new version now supports rewritingIN/EXISTSsubqueries inSELECTclauses into joins in some scenarios, aiming to enhance SQL execution performance through parallelism.Caching and persistence of storage procedures' DDL compilation results
In V4.3.1, a feature was added to persist the compilation results of stored procedures during execution, addressing performance issues caused by recompilation when fetching from the PL Cache fails. However, if the stored procedure itself undergoes DDL changes, recompilation was still required for subsequent executions, leaving room for further performance optimization in this scenario. V4.3.2 enhances this by caching and persisting compilation results in the PL cache after successful DDL execution. This increases the likelihood of directly hitting the PL cache during future executions, further improving stored procedure performance.
Performance optimization for adding NOT NULL columns to empty tables in Oracle mode
In historical V4.x versions, performing an
add column not nulloperation on an empty table in Oracle mode took longer than theadd column nulloperation. Additionally, the time difference between the two operations increased with the number of partitions. The new version changes the process of adding anot nullcolumn to an empty table to an online process, significantly boosting DDL performance in this scenario.Performance optimization for SHOW TABLE STATUS
In previous versions, the
SHOW TABLE STATUS FROM ... LIKE ...query had suboptimal performance as it did not utilizetable_namerelated indexes. The new version significantly enhances query performance in scenarios with single table filtering conditions.Performance optimization for auto-increment columns in Order mode
In the Order mode of auto-increment columns, it is necessary to maintain the continuity of data insertion. To ensure the order of auto-increment columns in a distributed architecture, the value is persisted to an internal table during the
INSERToperation. In high-concurrency scenarios, this process can result in relatively long response times. V4.3.2 optimizes this scenario by pre-fetching with a cache size, effectively reducing the number of accesses to the internal table and significantly improving performance.Performance optimization for sequences in Order mode
OceanBase Database now supports creating globally continuous sequences with specified order + cache attribute. However, earlier implementations ignored the cache attribute, treating it as order + nocache and thus leading to performance issues under high concurrency. V4.3.2 optimizes this by using a central node to support order + cache, effectively implementing the cache attribute and significantly enhancing performance in high-concurrency scenarios.
Reliability improvements
Standby tenant cloning
OceanBase Database has supported the tenant cloning feature since V4.3.0. When users need to perform temporary data analysis or other high-risk operations that consume significant resources on an online tenant, they can use a cloned tenant to complete the analysis or verification to avoid impacting the online tenant. Cloned tenants can also serve as a disaster recovery measure. If an irrecoverable error occurs on the original tenant, the cloned tenant can be used for data rollback. However, before V4.3.2, only the primary tenant could be cloned, and cloning the primary tenant would block log replay for standby tenants. In scenarios where the synchronization and replay priority of the standby tenant is higher than that of the cloning process, primary tenant cloning could not meet stability requirements. The new version addresses this by introducing the capability to clone standby tenants, enabling users to perform business verification or disaster recovery tasks through cloned standby tenants without obstructing log replay for these tenants, thereby reducing impacts on system stability.
Optimizations on transfer transactions
Since V4.3.0, the transfer functionality has supported the migration of active transactions. For example, requests from non-migrated tablets can continue on the Transfer source's log stream, and new transactions can be initiated. Transactions that are already in progress are briefly paused during the Transfer start phase, after which the transactions are committed. Building on this, V4.3.2 further optimizes the impact of transfer transactions on transaction execution. If a transaction on the Transfer source's log stream doesn't involve a migrated tablet, the transaction will continue without being blocked from submission and will not be migrated. This ensures that the front-end business remains unaffected and that the load balancing is more transparent.
Performance optimization for network standby databases
The new version optimizes the RPC and network framework to reduce the log transmission time between primary and standby databases. It also refines the controlled log fetching process for standby databases, decreasing the frequency of controlled log fetching for backup tenants and improving log synchronization performance between primary and standby databases.
Backup performance optimization
During backups, data integrity is maintained by verifying that the baseline version is greater than the minor compaction version through continuity checks. However, these checks require reading from backup media and executing locking operations, which affect performance. The new version reduces the performance overhead of continuity checks and allows control over the number of threads used via
ha_low_thread_score, effectively enhancing backup performance.Optimization of source selection for migration replication
In previous versions, when selecting the source for migration replication, there was no priority given to replicas in the same zone, the same IDC (same data center), or the same region (same city), which could potentially result in suboptimal performance for long-distance migration replication. Additionally, the source may select the leader node, which could lead to slow business requests and migration tasks, particularly when the business request volume is high. V4.3.2 divides each server into three types of regional relationships based on geographical information: in the same IDC, in the same region but different IDC, and across regions. It provides an enumeration parameter called
choose_migration_source_policy, allowing users to configure a specific priority mode for selecting the source for migration replication. This allows for prioritizing geographical proximity and follower replicas to enhance migration efficiency and alleviate pressure on Leader nodes.Physical restore at the SET/Piece level
In actual business scenarios, secondary backups often involve manually moving data backup sets or archived logs to new locations. OceanBase Database's physical restore feature was limited to restoring only from the tenant's archive and backup paths, making it impossible to use backup data moved manually, thus limiting recovery flexibility. The new version introduces
SET/PIECElevel physical restore functionality, offering theADD RESTORE SOURCEcommand to load data backup sets (SET) or log archives (PIECE) from new paths, allowing on-demand restoration to a specified point in time.
Resource optimization
Partition-Level index space optimization
During the process of creating indexes, internal SQL statements are used to load index table data. If a node has a large volume of data, temporary space amplification might occur during sorting. V4.2.2 introduced progressive execution for supplementing index table data: executing 1 GB of data per batch on a single node, while parallel tasks run across multiple nodes. This approach leverages distributed systems' parallel computing capabilities and addresses the issue of temporary space amplification during index construction.
CPU isolation for global frontend and background tasks
In high-performance computing environments, proper resource allocation and isolation are crucial for ensuring system stability and efficiency. Effective resource isolation prevents competition and interference between tasks, improving resource utilization and overall service quality. OceanBase Database currently allows resource isolation between tenants using unit specifications and within tenants using the
DBMS_RESOURCE_MANAGERpackage, covering key resources like CPU and I/O. For businesses with many tenants that want to prevent significant CPU competition from background tasks affecting frontend requests, global isolation of background tasks is a better option. OceanBase Database V4.3.2 supports global CPU frontend and backend task isolation, allowing resources for background tasks to be limited on a global level, which is more convenient and user-friendly compared with configuring each tenant individually withDBMS_RESOURCE_MANAGER.
Security enhancements
MySQL CREATE TABLESPACE privilege
Added the
CREATE TABLESPACEprivilege, which is applicable only to Transparent Data Encryption (TDE) scenarios.Enhanced privilege control over outlines and sequences in MySQL mode (Incompatible feature)
Previous versions lacked privilege control for creating and maintaining outlines and sequences. The new version reuses MySQL
CREATE,ALTER, andDROPprivileges to control the creation, modification, and deletion of outlines and sequences.
Usability improvements
Adaptive major compaction optimization for buffer tables
When users frequently insert data into a table while performing batch deletions or concurrent updates, they may encounter a noticeable drop in query and update performance, even if the number of data rows is not large. This phenomenon is known as the Queuing Table effect (sometimes called the Buffer Table effect) in OceanBase Database. This issue is common to databases with the LSM-Tree architecture. In an LSM-Tree architecture, delete operations are logically marked rather than physically removed until merged. When there are many marked deletions in incremental data, the physical row count can far exceed the logical row count, causing severe read amplification and affecting optimizer execution plans.
In V4.1.0, OceanBase Database achieved automatic identification of partitions with a high volume of changes over a period and performed adaptive compaction on these partitions. However, it lacked manual control measures. To flexibly address performance degradation issues caused by Buffer tables, the V4.3.2 further optimizes the adaptive merge feature for buffer tables. It provides five different levels of merge strategies, allowing users to set different
table_modefor each table based on business scenarios to address the read amplification caused by Buffer tables, thereby enhancing long-term system performance metrics such as QPS.System Log Optimization
In the system log directory, a new file
./alert/alert.logis added to record logs that are of relevance to database administrators (DBAs). This helps to address the issue of high volume and poor readability of theobserver.logfile. You can set the log level, such asINFO,WARN, andERROR, through the cluster-level parameteralert_log_level. Additionally, an external system tablesys_external_tbs.__all_external_alert_log_infois provided for direct structured queries ofalert.loginformation.OceanBase LogMiner
OceanBase Database V4.3.2 introduces support for OceanBase LogMiner (referred to as oblogminer). oblogminer is a command-line tool for analyzing logs in OceanBase Database, supporting both online and offline log analysis. oblogminer pulls and parses clogs using obcdc, transforming the logical logs output by obcdc into a readable format and storing them in a specified location. It is suitable for the following scenarios:
- Data misoperation: Data misoperations can occur due to various reasons, such as mistakenly deleting or updating redundant rows due to errors in range conditions in the
WHEREclause. oblogminer helps accurately identify details of such errors, enabling database restoration to its state prior to the misoperation. - Data analysis: oblogminer organizes and presents various information (transactions, table structures, etc.) from clogs in a user-friendly manner, enabling users to conduct diverse data analyses based on oblogminer's output. Additionally, it can be used in conjunction with external table functionality to perform query analysis within the database.
- Data misoperation: Data misoperations can occur due to various reasons, such as mistakenly deleting or updating redundant rows due to errors in range conditions in the
Table-level cache size setting for auto-increment columns
Currently, you can control the number of cached auto-increment values in memory by specifying the tenant-level parameter
auto_increment_cache_size, which applies to all tables using auto-increment columns. Generally, the larger the cache size, the better the performance. However, if there are frequent value hoopings and the upper limit of the auto-increment column values is relatively small, the auto-increment values may quickly run out. V4.3.2 introduces a table-level cache size setting for auto-increment columns. This enables users to customize cache sizes for different tables based on column type, business model, and business traffic, achieving a balance between value hoopings and performance.Enhanced PX diagnostics capability
To facilitate troubleshooting of distributed plans, V4.3.2 adds memory and disk usage of operators at runtime, as well as the maximum memory and disk usage of the entire execution process, to the SQL Plan Monitor. In SQL Audit, it records the
memtableandsstablerow counts corresponding to the QCtrace_idand supports summarizing relevant information for each PX worker'strace_id. Additionally, the obdiag tool can pull logs from the initial error-reporting machine based on thetrace_id.
Performance report
Based on the parameter templates for different business types, this version conducted the following performance comparison tests. In the AP benchmark test, the OLAP parameter template was used, demonstrating a significant performance improvements over other templates.
Hardware specifications:
OBServer: 3 servers (32c256g), instance type:
ecs.r7.8xlarge. The system disk is used as the log disk, and thecloganddatadisks are separately mounted on two cloud disks. The disk performance level is PL1.ODP: Independently deployed on a single server with 64c128g. Instance type:
ecs.c7.16xlarge.
Operating system:
CentOS 7.9 64 bit.
Tenant specifications:
28c180g, 3F, primary_zone=RANDOM.
1. SYSBENCH OLTP load testing
Basic parameters:
ALTER system SET enable_sql_audit=false;
ALTER system SET enable_perf_event=false;
ALTER system SET syslog_level='PERF';
ALTER system SET enable_record_trace_log=false;
- table: 30
- table_size: 100w
- time: 30s
Test result (QPS/95%rt):
Point Select performance
Threads express_oltp parameter template complex_oltp parameter template olap parameter template htap parameter template 32 163457.60/0.22 162747.70/0.22 161428.80/0.23 162948.95/0.20 64 296206.41/0.25 291823.36/0.26 291583.48/0.26 293622.63/0.25 128 505203.80/0.30 493859.95/0.31 492135.78/0.31 498132.19/0.31 256 798005.94/0.45 794547.97/0.47 803165.10/0.49 797304.31/0.45 512 1039286.05/0.90 1023822.11/1.14 1022666.33/1.12 1032713.76/0.90 1024 1013992.61/2.39 1011295.14/2.39 997362.00/2.57 1004848.34/2.48 Read Only performance
Threads express_oltp parameter template complex_oltp parameter template olap parameter template htap parameter template 32 134791.19/4.10 136145.15/3.97 137486.55/3.96 137327.53/3.95 64 244754.37/4.49 244093.17/4.57 244641.01/4.57 244586.46/4.57 128 416929.45/5.37 420143.73/5.47 419772.35/5.28 420445.05/5.28 256 613453.13/7.56 611436.43/8.28 603989.96/8.28 610998.14/7.43 512 725364.76/16.12 738362.91/17.65 736059.64/15.83 720899.31/16.12 1024 715777.22/41.10 707831.35/42.61 697077.19/44.17 706809.11/42.61 Write Only performance
Threads express_oltp parameter template complex_oltp parameter template olap parameter template htap parameter template 32 50914.06/5.00 52894.62/4.91 50589.47/5.67 52088.46/4.74 64 90119.99/5.47 93447.67/5.37 90202.65/5.37 90264.56/5.57 128 164488.33/5.77 166099.69/5.57 159493.96/5.99 159005.24/6.09 256 242240.38/8.13 241749.01/8.43 232320.85/8.43 230522.31/8.74 512 304060.67/13.70 306416.65/13.70 299155.86/13.70 289147.63/13.95 1024 345068.37/23.52 348929.05/26.20 306096.92/29.72 327905.15/27.17 Read Write performance
Threads express_oltp parameter template complex_oltp parameter template olap parameter template htap parameter template 32 90881.38/7.84 88141.94/8.28 88216.59/8.58 89948.44/7.98 64 159748.46/8.90 160695.31/9.06 157714.41/10.09 157230.31/9.39 128 273142.95/10.46 275431.02/10.27 272648.28/10.27 269700.79/11.24 256 391348.85/15.27 402154.83/15.00 382679.53/16.71 383447.47/15.27 512 465031.62/28.67 462574.18/33.72 466465.96/26.20 461249.29/27.66 1024 525924.96/52.89 535977.26/48.34 510540.58/58.92 522066.61/51.02
2. BMSQL TPCC testing
Basic parameters:
#ODP
ALTER proxyconfig SET proxy_mem_limited='4G';
ALTER proxyconfig set enable_compression_protocol=false;
#OBServer SYS tenant
ALTER system SET enable_sql_audit=false;
ALTER system SET enable_perf_event=false;
ALTER system SET syslog_level='PERF';
ALTER system SET enable_record_trace_log=false;
- warehouse=1000
- terminals=800
Test results:
| express_oltp parameter template | complex_oltp parameter template | olap parameter template | htap parameter template | |
|---|---|---|---|---|
| tpmC (NewOrders) | 292204.95 | 302608.69 | 264422.69 | 294316.6 |
| tpmTOTAL | 648918.9 | 672866.36 | 587580.74 | 654271.82 |
| Transaction Count | 3246324 | 3366013 | 2939166 | 3272514 |
3. TPCH testing
Basic parameters:
#OBServer SYS tenant
ALTER system flush plan cache GLOBAL;
ALTER system SET enable_sql_audit=false;
ALTER system SET enable_perf_event=false;
ALTER system SET syslog_level='PERF';
ALTER system SET enable_record_trace_log=false;
#Test tenant
SET GLOBAL ob_sql_work_area_percentage = 80;
SET GLOBAL ob_query_timeout = 36000000000;
SET GLOBAL ob_trx_timeout = 36000000000;
SET GLOBAL max_allowed_packet = 67108864;
SET GLOBAL parallel_servers_target = 624;
100G
Test results (all using columnstore tables):
| Query | express_oltp parameter template | complex_oltp parameter template | olap parameter template | htap parameter template |
|---|---|---|---|---|
| Q1 | 32.33s | 9.86s | 1.83s | 3.03s |
| Q2 | 1.42s | 0.52s | 0.22s | 0.26s |
| Q3 | 7.79s | 2.58s | 0.52s | 0.91s |
| Q4 | 9.55s | 3.01s | 0.27s | 0.66s |
| Q5 | 15.77s | 4.59s | 0.73s | 1.29s |
| Q6 | 0.25s | 0.11s | 0.06s | 0.06s |
| Q7 | 9.76s | 3.65s | 1.19s | 1.76s |
| Q8 | 5.72s | 1.85s | 0.39s | 0.61s |
| Q9 | 25.26s | 8.93s | 1.88s | 3.28s |
| Q10 | 3.96s | 1.74s | 0.46s | 0.75s |
| Q11 | 2.01s | 0.61s | 0.14s | 0.21s |
| Q12 | 6.00s | 1.89s | 0.33s | 0.66s |
| Q13 | 8.40s | 3.43s | 1.64s | 1.94s |
| Q14 | 0.99s | 0.45s | 0.19s | 0.25s |
| Q15 | 1.29s | 0.64s | 0.31s | 0.34s |
| Q16 | 2.69s | 1.07s | 0.53s | 0.61s |
| Q17 | 3.85s | 1.15s | 0.21s | 0.31s |
| Q18 | 17.53s | 5.51s | 1.33s | 1.96s |
| Q19 | 1.49s | 0.60s | 0.24s | 0.31s |
| Q20 | 6.02s | 2.38s | 1.33s | 1.33s |
| Q21 | 26.01s | 9.11s | 2.70s | 3.60s |
| Q22 | 6.01s | 2.23s | 0.79s | 1.00s |
| Total | 194.10s | 65.91s | 17.26s | 25.13s |
4. TPC-DS testing
#OBServer SYS tenant
ALTER system flush plan cache GLOBAL;
ALTER system SET enable_sql_audit=false;
ALTER system SET enable_perf_event=false;
ALTER system SET syslog_level='PERF';
ALTER system SET enable_record_trace_log=false;
#Test tenant
SET GLOBAL ob_sql_work_area_percentage = 80;
SET GLOBAL ob_query_timeout = 36000000000;
SET GLOBAL ob_trx_timeout = 36000000000;
SET GLOBAL max_allowed_packet = 67108864;
SET GLOBAL parallel_servers_target = 624;
100G
Test results:
| Query | express_oltp parameter template | complex_oltp parameter template | olap parameter template | htap parameter template |
|---|---|---|---|---|
| Q1 | 0.62 | 0.33 | 0.21 | 0.21 |
| Q2 | 10.19 | 3.29 | 0.99 | 1.26 |
| Q3 | 0.20 | 0.13 | 0.11 | 0.11 |
| Q4 | 36.42 | 17.89 | 11.29 | 11.90 |
| Q5 | 3.95 | 1.79 | 0.98 | 1.11 |
| Q6 | 0.55 | 0.31 | 0.22 | 0.23 |
| Q7 | 0.81 | 0.38 | 0.19 | 0.21 |
| Q8 | 0.55 | 0.32 | 0.24 | 0.24 |
| Q9 | 2.15 | 0.95 | 0.47 | 0.51 |
| Q10 | 1.81 | 0.85 | 0.52 | 0.54 |
| Q11 | 22.09 | 10.94 | 7.09 | 7.35 |
| Q12 | 0.47 | 0.29 | 0.22 | 0.24 |
| Q13 | 0.53 | 0.27 | 0.18 | 0.19 |
| Q14 | 81.19 | 26.90 | 7.86 | 10.40 |
| Q15 | 0.71 | 0.43 | 0.38 | 0.39 |
| Q16 | 5.18 | 1.74 | 0.57 | 0.73 |
| Q17 | 1.26 | 0.64 | 0.39 | 0.44 |
| Q18 | 0.71 | 0.39 | 0.26 | 0.28 |
| Q19 | 0.30 | 0.20 | 0.15 | 0.16 |
| Q20 | 0.39 | 0.26 | 0.19 | 0.21 |
| Q21 | 0.99 | 0.39 | 0.16 | 0.20 |
| Q22 | 4.93 | 2.14 | 1.12 | 1.26 |
| Q23 | 92.37 | 34.42 | 13.27 | 16.41 |
| Q24 | 3.47 | 1.55 | 0.84 | 0.93 |
| Q25 | 1.14 | 0.59 | 0.41 | 0.43 |
| Q26 | 0.49 | 0.26 | 0.16 | 0.19 |
| Q27 | 1.14 | 0.54 | 0.31 | 0.33 |
| Q28 | 1.37 | 0.95 | 0.83 | 0.84 |
| Q29 | 3.94 | 1.34 | 0.46 | 0.56 |
| Q30 | 0.40 | 0.27 | 0.22 | 0.22 |
| Q31 | 2.37 | 1.08 | 0.60 | 0.67 |
| Q32 | 0.12 | 0.11 | 0.10 | 0.10 |
| Q33 | 1.21 | 0.87 | 0.63 | 0.66 |
| Q34 | 2.22 | 0.77 | 0.22 | 0.29 |
| Q35 | 3.57 | 1.51 | 0.76 | 0.85 |
| Q36 | 1.98 | 0.85 | 0.29 | 0.40 |
| Q37 | 0.52 | 0.32 | 0.23 | 0.24 |
| Q38 | 7.00 | 2.99 | 1.50 | 1.70 |
| Q39 | 2.98 | 1.31 | 0.72 | 0.81 |
| Q40 | 0.29 | 0.18 | 0.15 | 0.15 |
| Q41 | 0.04 | 0.04 | 0.04 | 0.03 |
| Q42 | 0.18 | 0.12 | 0.10 | 0.10 |
| Q43 | 3.89 | 1.43 | 0.47 | 0.60 |
| Q44 | 0.50 | 0.45 | 0.44 | 0.46 |
| Q45 | 0.47 | 0.37 | 0.35 | 0.36 |
| Q46 | 0.97 | 0.46 | 0.28 | 0.30 |
| Q47 | 5.12 | 2.11 | 0.99 | 1.11 |
| Q48 | 0.54 | 0.29 | 0.17 | 0.18 |
| Q49 | 1.25 | 0.96 | 0.84 | 0.85 |
| Q50 | 8.07 | 2.36 | 0.44 | 0.65 |
| Q51 | 22.35 | 7.02 | 2.81 | 3.04 |
| Q52 | 0.17 | 0.13 | 0.10 | 0.10 |
| Q53 | 1.56 | 0.52 | 0.17 | 0.20 |
| Q54 | 2.24 | 0.97 | 0.54 | 0.57 |
| Q55 | 0.14 | 0.11 | 0.10 | 0.10 |
| Q56 | 0.67 | 0.61 | 0.60 | 0.59 |
| Q57 | 2.88 | 1.29 | 0.66 | 0.74 |
| Q58 | 1.15 | 0.85 | 0.69 | 0.69 |
| Q59 | 18.73 | 6.56 | 2.10 | 2.64 |
| Q60 | 1.16 | 0.85 | 0.67 | 0.69 |
| Q61 | 0.41 | 0.33 | 0.29 | 0.29 |
| Q62 | 3.00 | 1.15 | 0.37 | 0.47 |
| Q63 | 1.57 | 0.52 | 0.16 | 0.20 |
| Q64 | 6.74 | 3.01 | 1.45 | 1.71 |
| Q65 | 4.18 | 1.66 | 0.73 | 0.86 |
| Q66 | 1.00 | 0.61 | 0.38 | 0.40 |
| Q67 | 21.56 | 13.49 | 10.43 | 10.28 |
| Q68 | 0.37 | 0.26 | 0.22 | 0.23 |
| Q69 | 1.23 | 0.66 | 0.48 | 0.50 |
| Q70 | 5.39 | 2.26 | 1.15 | 1.28 |
| Q71 | 1.20 | 0.67 | 0.42 | 0.45 |
| Q72 | 22.39 | 14.68 | 10.40 | 11.09 |
| Q73 | 0.63 | 0.32 | 0.17 | 0.20 |
| Q74 | 14.22 | 6.83 | 3.68 | 3.93 |
| Q75 | 6.72 | 2.80 | 1.42 | 1.55 |
| Q76 | 0.39 | 0.38 | 0.39 | 0.38 |
| Q77 | 1.39 | 0.88 | 0.73 | 0.72 |
| Q78 | 14.46 | 5.91 | 2.57 | 3.00 |
| Q79 | 2.66 | 1.17 | 0.48 | 0.56 |
| Q80 | 2.94 | 1.50 | 0.97 | 1.00 |
| Q81 | 0.63 | 0.29 | 0.16 | 0.18 |
| Q82 | 0.78 | 0.45 | 0.32 | 0.33 |
| Q83 | 1.14 | 0.75 | 0.58 | 0.59 |
| Q84 | 0.58 | 0.28 | 0.18 | 0.18 |
| Q85 | 0.71 | 0.45 | 0.36 | 0.36 |
| Q86 | 1.14 | 0.56 | 0.34 | 0.39 |
| Q87 | 7.29 | 3.04 | 1.59 | 1.72 |
| Q88 | 1.83 | 0.78 | 0.29 | 0.36 |
| Q89 | 1.78 | 0.72 | 0.23 | 0.32 |
| Q90 | 0.44 | 0.22 | 0.14 | 0.15 |
| Q91 | 0.14 | 0.11 | 0.10 | 0.10 |
| Q92 | 0.11 | 0.10 | 0.10 | 0.10 |
| Q93 | 7.68 | 2.24 | 0.47 | 0.64 |
| Q94 | 2.74 | 1.08 | 0.49 | 0.56 |
| Q95 | 39.75 | 18.00 | 6.97 | 8.23 |
| Q96 | 2.43 | 0.78 | 0.20 | 0.26 |
| Q97 | 7.34 | 2.64 | 1.01 | 1.22 |
| Q98 | 0.64 | 0.42 | 0.31 | 0.33 |
| Q99 | 6.00 | 2.16 | 0.68 | 0.80 |
| Total | 570.64s | 242.76s | 119.88s | 134.26s |
Compatibility changes
Product behavioral changes
The following changes are introduced:
| Feature | Description |
|---|---|
| Columnstore tables no longer automatically create sum skip index by default | In earlier versions, columnstore tables automatically created a sum skip index for each column (storing pre-aggregated SUM values of specified column data within the storage layer's Range). To enhance import performance, starting from V4.3.2, the sum skip index is not created by default. To accelerate sum calculations on original columns, specify SKIP_INDEX(SUM). For example, create table t_default1(pk int primary key SKIP_INDEX(SUM), a int default 10 SKIP_INDEX(SUM));. |
| Prohibit offset semantics in limit clause of delete/update statements | In the new version, when ob_compatibility_version is set to 4.3.2.0 or a specified 4.3.x version in the future, the use of the offset semantics in the limit clause of delete/update statements is prohibited. Specifically, the previously supported update/delete...limit x,x and update/delete...limit x offset x syntax in OceanBase Database now results in a syntax error to align with the behavior of MySQL. |
| Limit user variables to a maximum of 64 characters | In the new version, when ob_compatibility_version is set to 4.3.2.0, or a specified 4.3.x version in the future, the length of user variables in MySQL mode has been changed from an unlimited length to a maximum of 64 characters. |
| Change the value of sql_id in the [g]v$ob_sql_audit view | In versions prior to V4.3.2 of the V4.3.x series, the sql_id for CALL statements was derived from the MD5 hash of an empty string, whereas for anonymous block statements, it was based on the MD5 hash of the unparameterized original PL/SQL code string. In V4.3.2, both sql_ids are modified to be the MD5 of the parameterized statements. |
| Change Rename Table to a locking operation | Previously, Rename Table was an online DDL operation without locking, potentially causing unexpected issues in transactions spanning Rename Table. V4.3.2 now supports table locks on Rename Table and adds read/write protection during the operation. |
| Different behavior of REPLACE('abd', '', null) based on ob_compatibility_control | In the new version, when ob_compatibility_version is set to 4.3.2.0, or a specified 4.3.x version in the future, after upgrading from an earlier version or for new tenants with ob_compatibility_control = MYSQL5.7, the behavior of REPLACE('abd', '', null) in MySQL mode has been changed from being compatible with MySQL 8.0 to being compatible with MySQL 5.7. |
| Column name projection for unspecified alias null values changed to NULL | MySQL sets the column name of unspecified alias null values (\N, null, Null...) to NULL, while null in complex expressions retains the original string. Older OceanBase Database versions did not modify the column name for null projections. In the new version, when ob_compatibility_version is set to 4.3.2.0 or a specified 4.3.x version in the future, the behavior in MySQL mode will be modified to align with MySQL. |
| Added privilege control for Outline and Sequence | In the new version, when ob_security_version is set to 4.3.2.0 or a specified 4.3.x version in the future, users in MySQL mode need to be granted CREATE/ALTER/DROP privilege to create and manage Outlines and Sequences. |
| Added the CREATE TABLESPACE privilege for creating and managing tablespaces | In the new version, when ob_security_version is set to 4.3.3.0 or a specified 4.3.x version in the future, users in MySQL mode need to be granted the CREATE TABLESPACE privilege to create and manage tablespaces. |
View changes
The following changes are introduced:
| View | Change type | Description |
|---|---|---|
| CDB/DBA_SCHEDULER_JOB_RUN_DETAILS | New | A new dictionary view (ported from Oracle mode) added under SYS tenant/MySQL mode to display job running records. In Oracle mode, fields such as LOG_ID, LOG_DATE, OWNER, JOB_NAME, JOB_SUBNAME, STATUS, REQ_START_DATE, ACTUAL_START_DATE, RUN_DURATION, INSTANCE_ID, SESSION_ID, SLAVE_PID, CPU_USED, CREDENTIAL_OWNER, CREDENTIAL_NAME, DESTINATION_OWNER, DESTINATION have been extended. |
| [G]V$OB_SQL_AUDIT | Modified | Added the PROXY_USER field to display proxy user name in scenarios involving proxy user logins. The SQL_ID field displays the actual MD5 code generated by statements for CALL statement executed PL requests and PL requests executed through anonymous blocks. |
| DBA_OB_SPATIAL_COLUMNS | New | A new view added in Oracle mode to display the database name, table name, type, and SRS information for spatial index columns. |
| V$OB_COMPATIBILITY_CONTROL | New | A new view added in MySQL mode to display all features that can control product behavior compatibility based on OceanBase Database's releases. |
| [G]V$SQL_WORKAREA | Modified | Added the DB_ID field to describe the database ID associated with the connection of the request. |
| information_schema.events | New | A new view added in MySQL mode. As of V4.3.2, event functionality is not yet supported. |
| sys_external_tbs.__all_external_alert_log_info | New | A new system external table added under sys tenant, used to structurally view alert.log log information. |
Parameter changes
The following changes are introduced:
| Parameter | Change type | Description |
|---|---|---|
| choose_migration_source_policy | New | A tenant-level parameter to control the selection strategy for migration source. It provides 2 options:
|
| storage_rowsets_size | New | A tenant-level parameter to control the number of rows in a single vectorized batch processing for the columnar engine. The default value is 8192. |
| alert_log_level | New | A cluster-level parameter to control the log level of alert.log, such as INFO, WARN, ERROR. The default value is INFO. |
| enable_global_background_resource_isolation | New | A cluster-level system parameter to control whether to isolate CPU resources for global background and foreground tasks. The default is False, indicating no isolation. |
| global_background_cpu_quota | New | A cluster-level system parameter to control the CPU quota available to background tasks when enable_global_background_resource_isolation is set to True. The default is -1, indicating no cgroup restriction. |
| ob_default_lob_inrow_threshold | Modified | Specifies the maximum threshold for LOB INROW storage and its default value is changed from 4096 to 8192. |
System variable changes
The following changes are introduced:
| System variable | Change type | Description |
|---|---|---|
| ob_compatibility_control | New | A new Global level system variable for MySQL tenants to control whether OceanBase Database behaves consistently with MySQL 5.7 or MySQL 8.0 in cases of compatibility behavior conflicts. The default is MYSQL5.7. It is specified when creating a tenant and cannot be modified after the tenant is created. |
| ob_compatibility_version | New | A global system variable under tenants to control product behavior changes and which OceanBase release version they are compatible with. It defaults to the current cluster version when creating a new cluster, or the configuration of the previous version during version upgrade. The current default is 4.3.3.0. It can be modified. |
| ob_security_version | New | A tenant-level global system variable. It is used to control security-related product behavior changes and compatibility with OceanBase release versions. It defaults to the current cluster version when creating a new cluster, or the configuration of the previous version during version upgrade. The current default is 4.3.20. It can be modified. The difference with ob_compatibility_version is that it can only be increased and cannot be downgraded. |
System package changes
| System package | Change type | Description |
|---|---|---|
| DBMS_EXTERNAL_TABLE | New | Added the DBMS_EXTERNAL_TABLE.REFRESH_ALL_TABLE(interval int) system package procedure for managing scheduled refresh tasks of external table file lists. |
| DBMS_SCHEDULER | Enhanced |
|
| SDO_GEOM | New | Added the SDO_GEOM.SDO_DISTANCE member function for calculating the minimum earth surface distance between two spatial geometric objects. |
| UTL_RECOMP package | New | Added a system package in Oracle mode for re-compiling database objects. It can be used for checking the validity of database objects after an upgrade. |
| DBMS_PROFILER package | New | Added a system package in Oracle mode for diagnosing the performance of each line of PL runtime. |
Function changes
| Function | Change type | Description |
|---|---|---|
| PASSWORD | New | A new function for encrypting strings in MySQL mode. |
| SDO_RELATE | New | A new function for determining the spatial relationship between two spatial geometry objects in Oracle mode. |
| Roaringbitmap-related functions | New | Supports over 20 expressions for cardinality calculations, set operations, bitmap checks, bitmap construction, bitmap output, and aggregate operations. |
Syntax changes
| Syntax | Description |
|---|---|
| Added support for insert overwrite syntax. | / |
| Added options for automatic refresh of external table file directories. | Added the AUTO_REFRESH option to the create external table statement to specify the file list refresh method (manual, real-time, periodic). |
| Added commands to specify set/piece level recovery sources. |
|
| Added the auto_increment_cache_size option | Added table option syntax, which can specify auto_increment_cache_size when creating or altering a table. For example, the default value of CREATE TABLE t1 (...) auto_increment_cache_size = xxx; and ALTER TABLE t1 SET auto_increment_cache_size = xxx; is 0, indicating that it is not configured, and the tenant-level parameter is used as the auto-increment column cache size. |
| Added the table_mode option. | In V4.3.2, the table-level parameter table_mode from the V3.x series has been re-enabled. Users can set different table-level parameters for each table to specify different fast freeze and adaptive major compaction strategies to address Buffer Table issues. For example: CREATE TABLE t1(c1 INT) table_mode = 'normal/queuing/moderate/super/extreme';. |
| CTAS supports parallel execution. | Allows you to specify a concurrency hint in the CREATE TABLE AS statement, for example, create /*+ parallel(N) */ table xxx as select. |
| Trigger creation supports IF NOT EXISTS syntax in MySQL mode. | Compatible with the IF NOT EXISTS syntax for creating triggers in MySQL. |
Supports using \N for NULL in SQL statements in MySQL mode. |
Compatible with MySQL syntax where \N represents NULL. |
| Supports DROP USER IF EXISTS syntax in MySQL mode | Compatible with MySQL's DROP USER IF EXISTS syntax. |
| Supports CREATE TABLE ... [IGNORE | REPLACE] SELECT in MySQL mode. | Compatible with MySQL's IGNORE \| REPLACE attribute in table creation. |
| Supports STRAIGHT_JOIN for the SELECT statement in MySQL mode | Partially compatible with MySQL's STRAIGHT_JOIN keyword to indicate table join order. |
Recommended versions of platforms and tools
The following table lists the recommended versions of platforms and tools for OceanBase Database V4.3.2.
| Platforms and tools | Version | Remarks |
|---|---|---|
| ODP | ODP V4.3.1 | - |
| OCP | OCP V4.3.0 BP2 | - |
| ODC | ODC V4.2.3 BP1 | The columnar storage feature and materialized views are not fully supported yet. |
| OBCDC | OBCDC V4.3.2 | - |
| OMS | Public Cloud 202401 | The columnar storage feature is not fully supported yet. |
| OCCI | OCCI V1.0.3 | - |
| OBCI | OBCI V2.0.9 BP1 | - |
| ECOB | ECOB V1.1.8 | - |
| OBClient | OBClient V2.2.6 | - |
| LibOBClient | LibOBClient V2.2.6 | - |
| OBJDBC | OBJDBC V2.4.10 | - |
| OBODBC | OBODBC V2.0.9.1 | - |
| obloader | obloader V4.2.8.2 | - |
Upgrade notes
- Online upgrade from V4.3.1 Beta to V4.3.2 Beta is supported.
- Upgrading from the V4.2.x series or earlier versions to V4.3.2 Beta is currently not supported. As the versions evolve, support for upgrading from V4.2.x to V4.3.x will be added in the future.
- V4.3.2 has refactored the persistent format of multi-source data. The upgrade requires converting between old and new multi-source data formats, which needs some disk space and time. Therefore, it is recommended to perform the upgrade when more than 50% of disk space is available and allocate sufficient time for the upgrade if there are many partitions.
Considerations
CPU isolation for global background and foreground tasks requires mounting the Cgroup directory. It will only take effect after enable_global_background_resource_isolation is enabled and the system is restarted.