Tens of Millions of Members, Billions of Transactions: When the CRM System Buckles, How Did a Leading Pharma Company Upgrade to OceanBase for Real-Time, Precision Marketing?

Author: Zhang Hongxia, Director of the New Retail Product Division, Qingdao Yunuo Network Information Co., Ltd.

Overview

Today, pharmaceutical retailers are no longer content with merely “selling medicine” — they aim to become “health management partners.” By building an all-channel service architecture centered on a CRM membership system and deeply integrating online and offline, these companies have achieved limitless extension of service across time and space, centralized management and intelligent application of member data, and precise reach and efficient conversion of marketing campaigns.

As a leading pharmaceutical retailer, Chongqing Pharmaceutical (Group) Co., Ltd. (hereinafter “Chongqing Pharmaceutical Group”) traces its origins to the Southwest Regional Company of China National Pharmaceutical Corporation, founded in 1950. It serves the entire pharmaceutical value chain, while also engaging in drug R&D (MAH) and medical device manufacturing, and investing in the pharmaceutical industry. Chongqing Pharmaceutical Group has more than 200 subsidiaries across all tiers and is transforming from a traditional distribution and commercial enterprise into an “Internet + pharmaceuticals” integrated modern pharmaceutical company.

As its CRM membership system has been in use longer and longer, the underlying traditional database has gradually struggled to meet the demand for efficient processing of complex data. Faced with the convergence of massive transactions and multidimensional behavioral data, Chongqing Pharmaceutical Group’s CRM membership system urgently needed a database with high availability, strong consistency, and scalability. After comparing three domestic distributed databases, Chongqing Pharmaceutical Group chose OceanBase, ultimately achieving stable system operation, real-time analysis of complex scenarios, a 25x boost in query efficiency, and 60% storage savings.

This database upgrade of Chongqing Pharmaceutical Group’s CRM system not only improved the user experience and brand loyalty, but also laid out clear business requirements and a data foundation for the group’s subsequent construction of a high-performance, highly available “group-level digital operations hub,” building a scalable, replicable, and auditable group-wide operations system.

A Transformation of the Pharma Retail Business Model: The CRM System Enables All-Channel Coordination

As consumer behavior undergoes digital transformation and health needs continue to upgrade, the pharmaceutical retail industry is experiencing a profound shift in its business model. The traditional pharmacy’s “sell whatever we have” logic is gradually giving way to a “what does the customer need” logic. Beyond in-store service, companies now also support online services — for example, establishing long-term communication channels through enterprise WeChat and official accounts, placing orders on behalf of customers via mini-malls, and answering questions online.

To build a customer trust system grounded in professional service, pharmaceutical companies have established a complete membership service system — the CRM membership system — to bind multiple sources of member information, build precise member tags and profiles, and provide members with more service and marketing. By enhancing professional service capabilities through data-driven decision-making, they improve their competitiveness within the industry and grow revenue.

As shown in Figure 1, the CRM membership system enables online and offline all-channel coordination, supporting key capabilities such as unified member profiles, a well-developed tagging system, automatic trigger mechanisms, store-staff outreach enablement, and community marketing. It completes the loop: customer purchases medicine in-store/online → completes the transaction → data accumulates in the CRM → triggers service and marketing → repeat purchase → reach the customer again — realizing a positive “transaction–service–repeat transaction” cycle.

Tens of Millions of Members, Billions of Transactions: When the CRM System Buckles, How Did a Leading Pharma Company Upgrade to OceanBase for Real-Time, Precision Marketing?

Figure 1: The CRM membership system enables online and offline all-channel coordination

Building the CRM Membership System to Meet the Need for Unified Management

Chongqing Pharmaceutical Group built its CRM membership system because its various subsidiaries had fragmented member management and systems that lacked unified planning, which made it hard to accumulate data, led to inconsistent service, made operations difficult to replicate, and — lacking real-time monitoring — struggled to support decision-making.

To achieve unified management, Chongqing Pharmaceutical Group built its CRM membership system in phases. Phase one completed the foundational build of the membership marketing platform, creating a group-wide, standardized, data-driven operational base, with the following core goals:

  • Build a group-wide member operations platform. Achieve integrated management across group–subsidiary–store, connecting the organizational structure with the business chain to ensure members receive a consistent service experience across different tiers and channels.
  • A unified member operations service system. Build standardized processes covering member management, marketing campaigns, and service delivery, reducing the efficiency loss caused by fragmented operations and improving overall operational coordination.
  • Rapidly replicable standardized service capabilities. Form actionable service templates and operational mechanisms to help new businesses and subsidiaries quickly replicate proven experience, shortening build cycles and improving rollout efficiency.
  • Unified analysis of business data. Accumulate complete data assets, break down information silos, and enable multidimensional, unified analysis across members, stores, and regions, providing strong support for corporate strategic decision-making and compliance auditing.

Guided by the above goals, we took three core measures:

  • Joining forces with the group’s member center to advance integration. Cover all of the group’s brands and online members, achieving unified operation of online and offline members and full-domain value management (see Figure 2).
  • Building multi-tier organizational-structure reporting. Support permission management for group, brand, and store, with flexibly configurable permissions, making it easy for group headquarters to perform cross-brand data report analysis.
  • The group issuing tasks in a unified way. The group can issue sales tasks, patient-education campaign tasks, and customer-acquisition tasks to each brand, achieving unified management and supervised execution of group tasks.

Tens of Millions of Members, Billions of Transactions: When the CRM System Buckles, How Did a Leading Pharma Company Upgrade to OceanBase for Real-Time, Precision Marketing?

Figure 2: Unified member operations architecture for the group

We plan to pilot the above measures at a few of the group’s regional companies; if successful, we will roll them out comprehensively. After a successful rollout, Chongqing Pharmaceutical Group’s member operations platform will evolve from a “single business system” into a “group-level digital operations hub.” Relying on a unified technical base and standardized processes, the platform will not only achieve comprehensive onboarding of multiple subsidiaries and brands, but also build a scalable, replicable, and auditable group-wide operations system.

In addition, to achieve unified operation of members across all channels, the platform integrates data scattered across various systems to build a unified, dynamic, multidimensional system of member tags and profiles (see Figure 3), supporting fine-grained operational decisions.

Tens of Millions of Members, Billions of Transactions: When the CRM System Buckles, How Did a Leading Pharma Company Upgrade to OceanBase for Real-Time, Precision Marketing?

Figure 3: A multidimensional system of member tags and profiles

Through precise service from the membership system, we feed back into our online and offline member marketing and service — achieving online precision marketing, personalized recommendations, great-product pushes, and member care, and offline related-medication advice, chronic-disease management reminders, proactive store-staff outreach, and more — improving marketing conversion rates, strengthening customer stickiness, and closing the loop of “data-driven service.”

Fine-Grained Member Service Brings Massive-Data Query and Storage Challenges

However, as the group-wide member operations platform advanced and the fine-grained service model deepened, user data grew exponentially in scale, significantly increasing the system’s query and storage complexity.

  • Member count: surpassing tens of millions, covering multiple brands and regional companies.
  • Transaction data volume: reaching the billions, covering online and offline medicine purchases, coupon usage, repeat purchases, and other behaviors.
  • User behavioral data: including product browsing, search, add-to-cart, and so on — also totaling tens of millions or more.

This data comes from many channels — online malls, private-domain platforms, official accounts, and others — and, after being integrated through the tagging system, is used to build three-dimensional member profiles that support precision marketing and two-way traffic.

But the data’s huge volume, diverse types, and high real-time requirements pose severe tests of the database’s high-concurrency read/write capability, storage scalability, and query performance. Faced with the convergence of tens of millions of members, billions of transactions, and multidimensional behavioral data, the traditional database could not meet the demand for efficient processing, and a distributed database system with high availability, strong consistency, and scalability was urgently needed.

Upgrading the CRM Membership System’s Database to Tackle the Challenge of Processing Tens of Millions of Records

Technical Bottlenecks of the Traditional Database Constrained Business Growth

As Chongqing Pharmaceutical Group’s member service platform scaled up, the total data volume rapidly grew to tens of millions of records and tens of TB of storage. When supporting fine-grained member operations, the traditional relational database exposed four core challenges.

  • Performance: under high-concurrency read/write and complex-query scenarios, the InnoDB tables with millions of rows suffered a marked drop in performance and could not meet business needs. Meanwhile, because the business strongly depends on transactional consistency, sharding could not be used to improve performance.
  • Efficiency: due to business needs, core archives must retain large amounts of data (tens of TB), which causes long DDL cycles and delays the launch of business features.
  • Cost: as the number of companies grows and data accumulates year over year, storage costs will only rise.
  • Timeliness: across various scenarios, the need for timely data processing is growing ever stronger.

There is no shortage of real business cases behind these technical challenges.

Case 1: A Large Chain Store — Ensuring Performance While Meeting Xinchuang Requirements

These days, the national requirements for information technology application innovation (Xinchuang) are increasingly strict, especially within state-owned enterprises, where systems must meet the relevant standards to go live. To respond to this trend, we strictly selected database products according to the Xinchuang catalog, and carried out comprehensive business-scenario adaptation and performance validation.

  • Data preparation: 99.5 million+ member cards, 199.8 million+ orders.
  • Databases validated: OceanBase, Database 1, Database 2.
  • Functions validated: 14 report items, 8 advanced-filter items.
  • Reference standards: report queries under 20s, static-data generation under 60s, advanced filtering under 15s.

The test results are shown in Figure 4. OceanBase significantly outperformed the other two domestic databases across all test items, with performance far exceeding expectations in all three scenarios — report queries, advanced filtering, and static data:

  • Report queries under 7s, an average speedup of more than 78x.
  • Advanced filtering responded in under 1s, a speedup of 200–700x.
  • Static-data generation under 46s, an efficiency gain of more than 6.7x.

Tens of Millions of Members, Billions of Transactions: When the CRM System Buckles, How Did a Leading Pharma Company Upgrade to OceanBase for Real-Time, Precision Marketing?

Figure 4: Test results for OceanBase, Database 1, and Database 2

While strictly adhering to national Xinchuang requirements, OceanBase not only fully met the compliance admission criteria, but also delivered outstanding performance in complex-query and batch-processing scenarios at the scale of tens of billions of records, far surpassing comparable domestic database products. Based on this, we summarized the performance data for the three databases and submitted a detailed analysis report to the customer.

Case 2: Rapid Growth in Chain Membership and Order Transaction Data, with Real-Time Query Bottlenecks

Beyond Xinchuang requirements, customers’ demands for business real-time-ness and timeliness are also growing. In the past, companies relied mainly on BI tools to generate periodic reports and could tolerate data latency of hours or even days. However, as marketing strategies evolved toward precise reach and instant response, business staff need near-real-time data support in scenarios such as identifying high-value customers, triggering repeat-purchase reminders, delivering targeted marketing, and recommending health knowledge. To deliver precise service, operations staff often need to perform multidimensional combined filtering across member information, member attributes, purchase history, member tags, product sets, and more. Because too many dimensions are involved, problems can arise — query failures, excessively long query times, limited range coverage, and complex queries that simply cannot be supported. Clearly, these are problems the customers we serve cannot accept.

Case 3: Massive Business Data — Hard to Balance System Availability and Storage Cost

As chain pharmaceutical companies’ membership systems keep expanding and digital operations deepen, an exponential growth in business data volume is inevitable, and the high storage cost brought by massive data has become one of the key bottlenecks constraining the system’s sustainable development.

  • User data: cumulative member count surpassing tens of millions (>10 million).
  • Transaction records: daily order volume reaching the millions, with cumulative history exceeding the billions (>100 million records).
  • User behavioral data: including browsing, search, add-to-cart, favorites, and other behavior records — also totaling tens of millions or more.

A single business database instance already occupied N TB of space and grew linearly over time. As the customer count increased and the business kept expanding, the space occupied by business database instances quickly climbed to tens of TB or even hundreds of TB. This data not only supports day-to-day business operations, but also must be retained long-term to meet needs such as compliance auditing, precision marketing, and customer-profile construction. The company faced the challenge of reducing storage cost while guaranteeing performance and availability.

Therefore, introducing a new generation of distributed database with efficient data compression, automatic hot-cold tiering, and elastic scaling is the inevitable choice for “maximizing data value while minimizing storage cost.”

Introducing the Database Technology to Support Efficient Processing of Massive Transaction Data

Considering both the business needs and the technical bottlenecks of the traditional database, we needed to replace the traditional database and upgrade to a high-performance, highly stable, low-cost, HTAP-integrated distributed database.

Starting in 2023, we began systematically evaluating and introducing OceanBase, going through key stages such as technical familiarization, multiple rounds of testing, toolchain validation, and a SaaS-level pilot launch (see Figure 5), and ultimately applied it successfully to Chongqing Pharmaceutical Group’s member management platform.

Tens of Millions of Members, Billions of Transactions: When the CRM System Buckles, How Did a Leading Pharma Company Upgrade to OceanBase for Real-Time, Precision Marketing?

Figure 5: Key stages of bringing OceanBase online

1. Technical Introduction and Evaluation Stage (2023)

The testing focused on three parts.

First, daily jitter testing. In the early testing of OceanBase, we first conducted business stress testing. During off-peak hours, with business cooperation, we applied pressure directly using 100% simulated online traffic — as many as four rounds of stress testing, each lasting more than 3 hours.

Second, scale-out/scale-in testing. We performed the relevant operations and validation during low business traffic. To verify whether any low-probability events would occur, we ran a week of scripted automatic scale-out/scale-in operations to observe stability.

Third, Add Index testing. Similar to scale-out and scale-in, based on business traffic we performed dozens of add-index operations on a 1 TB large table, observing the latency.

2. SaaS Product Pilot Launch (December 2023)

After completing comprehensive technical validation, our company applied OceanBase to an internal SaaS product as the first production-grade pilot scenario. This stage achieved:

  • The database running stably in a real business environment.
  • Validation of full-lifecycle management capabilities such as migration, operations, and monitoring.
  • Accumulation of valuable hands-on experience, laying a solid foundation for subsequent customer projects.

3. Official Launch of the Chongqing Pharmaceutical Group Project (April 2025)

Building on the thorough earlier validation and pilot results, in April 2025 we officially launched the Chongqing Pharmaceutical Group member management platform project, putting OceanBase into production use to support efficient processing of massive transaction data.

The Member Service Platform’s “New Look”: Stable, High-Performance, Low-Cost

Building a Standardized Data Pipeline to Process Massive Data Stably and Efficiently

Currently, OceanBase mainly supports the analytical business scenarios of Chongqing Pharmaceutical Group’s member service platform, supporting high-concurrency, multidimensional member-data queries, tag computation, report generation, and precision-marketing decisions. Its core value lies in: efficient processing of massive historical data, support for complex real-time analysis, and guaranteed query performance and system stability.

The entire data pipeline follows a three-tier architecture of “source systems → CRM intermediate cleansing → OceanBase analytical store,” as shown in Figure 6.

Tens of Millions of Members, Billions of Transactions: When the CRM System Buckles, How Did a Leading Pharma Company Upgrade to OceanBase for Real-Time, Precision Marketing?

Figure 6: The data analysis pipeline of the member service platform

The data sources (source systems) include POS order data, member information from each channel, organizational personnel data, member tag data, profile measurement data, and the full product master data.

  • Intermediate and cleansing layer (CRM system): all raw data enters the CRM system via scheduled extraction or real-time ingestion, undergoing unified data cleansing, deduplication, merging, and standardization. Key processing strategies include historical data cleansing, order data merging, points-logic processing, dynamic updating of member tags, purchase-behavior computation, and activity-model computation.
  • Target storage and analytics layer (OceanBase analytical store): the cleansed data is written to the OceanBase analytical store in real time or on a schedule via synchronization, and is divided into raw data tables, static-processing tables, daily/monthly tables, and report intermediate tables.

By building a standardized data pipeline of “source data → CRM cleansing → OceanBase analytical store,” we achieved unified integration of multi-source heterogeneous data, high-performance responses for complex analytical scenarios, and long-term retention and efficient use of business data.

Complex Member-Selection Scenarios: Query Efficiency Improved by 25.7x

In the actual operation of Chongqing Pharmaceutical Group’s member service platform, multidimensional combined filtering (see Figure 7) is a core capability supporting fine-grained marketing and customer management. For the database, this is a classic complex-query scenario: users need to perform precise matching across multiple dimensions simultaneously, and queries typically involve multi-table joins, numerous filter conditions, and aggregation — a real test of a database’s execution efficiency. By enabling OceanBase’s columnar storage mode (Columnar Storage), we shortened the response time of the traditional database MySQL from 18 seconds to 0.7 seconds, a 25.7x performance improvement — meeting the business’s stringent need for “real-time segmentation and instant reach,” and significantly improving the system’s overall throughput and user experience.

Tens of Millions of Members, Billions of Transactions: When the CRM System Buckles, How Did a Leading Pharma Company Upgrade to OceanBase for Real-Time, Precision Marketing?

Figure 7: Multidimensional combined filtering in the member service platform

Saving 60% of Storage Space, Effectively Easing Storage Cost Pressure

OceanBase manages the full dataset in two parts: first, incremental data (Memtable), i.e., the hot data written in real time into memory, supporting fast reads and writes; second, baseline data (static data), i.e., the cold data that has been merged and persisted, stored on disk.

For static data, OceanBase uses efficient compression algorithms to deeply compress the columnar-stored data, significantly reducing disk I/O and storage overhead. For example, when the total raw data volume is 4 TB, MySQL must retain all of the data completely, occupying 4 TB of storage; whereas OceanBase, through high compression of the static data, needs only 1.5 TB to hold data of the same scale.

In the actual deployment at Chongqing Pharmaceutical Group’s member service platform, OceanBase — through its advanced columnar storage engine and efficient compression algorithms — significantly reduced storage space usage, achieving more than 60% storage savings for the same volume of business data, effectively easing the storage cost pressure brought by massive data.

Looking Ahead: Continuing to Advance the Deep Integration and Value Release of OceanBase

With OceanBase’s successful rollout at Chongqing Pharmaceutical Group’s member service platform, we are confident in its application across a broader range of business domains and customer groups. Looking toward 2026 and beyond, we will continue to advance OceanBase’s deep integration and value release along four directions: scenario expansion, customer promotion, technology integration, and product adaptation.

Applying It to More Business Scenarios and Products

Currently, OceanBase already stably supports the complex analytical business of Chongqing Pharmaceutical Group’s member management platform (such as precise selection, tag computation, and report generation). The order processing center and operations diagnostics product have also begun using OceanBase in production. Next, we will push for its full integration into day-to-day operational service scenarios, including real-time member service, marketing campaign execution, AI-powered recommendations, and other business scenarios.

In addition, we will gradually adapt OceanBase to more internal products, including product master data management, the patient health management platform, and the intelligent replenishment and supply-chain coordination system, building a unified, elastic, intelligent, enterprise-grade data infrastructure centered on OceanBase.

Recommending It to Industry Customers

Driven by both national Xinchuang policy and enterprises’ pursuit of cost reduction and efficiency gains, we have made OceanBase our first-choice database for scenarios requiring high concurrency, large data volumes, and strong consistency, and we actively promote it to industry customers. To date, it has been successfully deployed at the following large pharmaceutical companies: Yangtze River Pharmaceutical Group, Luyan Medical, Chongqing Pharmaceutical Group, Shanghai Pharmaceuticals, and Nepstar. In the future, we will continue to prioritize recommending OceanBase as the database foundation for key systems such as member service and order centers, helping more companies complete secure, efficient, low-cost database localization.

Exchanging Development Experience and Accumulating Operations Know-How

To continuously improve our team’s and our customers’ OceanBase capabilities, we plan to regularly organize specialized training, participate in community tech salons, jointly build problem-resolution mechanisms, and hold regular database training and hands-on sharing sessions to discuss and resolve the problems we encounter — striving to build a versatile database application team that “understands the business, masters the technology, and can deliver.”

In the future, we will join hands with more partners to jointly explore the innovative path of “database + AI + industry scenarios,” injecting new momentum into the high-quality development of the pharmaceutical and health industry.