GBase News
GBase 8c Core Migration: 99.84% SQL Compatibility
Migrating a core database is not simply moving data into a new system — it means validating the refactoring workload, performance headroom, and failure impact item by item. Under the constraints of terabyte-scale core data and a large body of legacy code, a large insurer worked with GBase 8c to complete a smooth migration of its core system. The team first ran a full-database SQL compatibility assessment, then carried out partitioning and parallel optimization, and planned the disaster recovery architecture around a two-city three-center model. The assessment showed 99.84% SQL syntax compatibility, meaning the vast majority of legacy SQL needed no rewrite; post-migration performance in the server environment was verified through POC testing to meet the planned targets. This article examines the technical logic and hands-on lessons behind this benchmark finance project.
99.84% Compatibility: Minimal Code Changes
The biggest obstacle in core system migration is usually the compatibility and rewriting of legacy SQL. To get a complete picture, the team extracted all historical SQL in the core database, ran syntax and performance assessments, and compiled 14,908 statements with full logic for in-depth evaluation.
The result was striking: overall SQL compatibility reached 99.84%. The few incompatible constructs fell into three categories: certain uses of IN, PL/SQL RETURNING clauses, and sampling functions.
For these, the team rewrote each statement according to its calling pattern, completed business regression testing, and verified returned results and variable assignment logic. Compatibility of database objects — tables, indexes, constraints, triggers, and more — was close to 100%.
In addition, the migration upgraded the character set from GBK to UTF-8, resolving the storage and display of rare characters in policyholder names and clearing the way for future business expansion.
Performance Optimization: Choosing a Strategy Based on Workload Characteristics
In core business, large-table queries are the main culprit behind slow response times. A deep analysis of the insurer's large tables and access frequency showed that the most frequently accessed large tables were mostly in the 50–60 GB range, and that all core large tables had natural time fields.
Rather than simply adding hardware, GBase 8c used time-based partitioning together with partition pruning, local indexes, and parallel processing to split tables horizontally — completely transparent to the business. POC tests (run on a Kunpeng server environment) gave the clearest comparison:
Policy service domain data extraction: the original source system took 76 seconds; a standard GBase table took 31.7 seconds (58% faster), and a partitioned table just 28.6 seconds (62% faster). Even when the data volume grew to four times the original, execution time rose only slightly to 36.3 seconds — still 52% faster than the source system at single data volume.
Quality inspection data extraction: the source system needed 16.2 seconds, while the GBase 8c partitioned table took only 5.4 seconds — a 67% improvement. At four times the data volume, the time fell further to 3.1 seconds, an 80% improvement.
Stress tests covered multiple key business scenarios at 1x, 2x, and 4x data volumes. In the POC environment, as data volumes grew, GBase 8c performed on par with or better than the source system, with no noticeable degradation in key scenarios.
Rock Solid: Two-City Three-Center and Failover
For a financial core system, stability comes first. Given the insurer's read-heavy workload and strict two-city three-center requirements, the project deployed a multi-replica disaster recovery architecture, with the primary center and same-city and remote DR centers each taking on their respective roles to meet regulatory continuity requirements. Specific node placement follows the project plan; topology details are not disclosed here.
The design combines high-availability arbitration with VIP failover: arbitration handles primary-standby switching, while VIP drift migrates the address layer, so the application side needs no manual connection-string changes — minimizing impact on business.
Architecture Review: Starting from Project Constraints, Not Route Labels
The insurer's data scale, query characteristics, and continuity requirements together drove this choice: high-latency SQL was dominated by complex queries, and two-city three-center compliance was mandatory.
Based on these concrete constraints, the team evaluated how well shard keys matched query conditions, the cross-node data exchange overhead that distributed execution plans might introduce, and the SQL rework required during migration. They ultimately chose GBase 8c in its primary-standby centralized form to carry the core database migration, and validated partitioning, parallelism, and read-write splitting accordingly.
It should be noted that GBase 8c also offers multiple forms, including primary-standby centralized and distributed deployments, covering different data scales, concurrency pressures, and scaling needs.
The success of this large insurer core database migration is not just a validation of the database platform in a highly complex finance core scenario — it is a vivid example of technology modernization taking root in the finance industry. From 99.84% compatibility, to outperforming the source at four times the data volume, to a smooth migration with no user impact, GBase 8c is steadily moving database modernization from "usable" to "dependable" and "trusted" with solid engineering depth.
As organizations move into the deep waters of digital transformation, choosing a database that understands the business, performs strongly, and stays reliable is the ballast for long-term success. GBase 8c will keep deepening its expertise and support technology modernization across industries.
FAQ
What constraints did this project face?
The insurer's core system migration was constrained by terabyte-scale core data and a large body of legacy code. High-latency SQL was dominated by complex queries, and two-city three-center compliance was mandatory. These factors together drove the technology choice.
What did the SQL compatibility assessment show?
The team compiled 14,908 statements with full logic and assessed them in depth. Overall compatibility reached 99.84%, and objects such as tables, indexes, constraints, and triggers were close to 100% compatible — the vast majority of legacy SQL needed no rewrite.
Which incompatible constructs were found?
Three categories: certain uses of IN, PL/SQL RETURNING clauses, and sampling functions. Each was rewritten according to its calling pattern, followed by business regression testing and verification of returned results and variable assignment logic.
What else was resolved during the migration?
The character set was upgraded from GBK to UTF-8, resolving storage and display of rare characters in policyholder names and clearing the way for future business expansion.
What performance strategy was used?
Analysis showed the most frequently accessed large tables were mostly 50–60 GB with natural time fields. Instead of adding hardware, GBase 8c used time-based partitioning with partition pruning, local indexes, and parallel processing for transparent horizontal splitting.