As market competition intensifies and enterprises scale up, the need for fine-grained financial management has never been higher—marking a pivotal step toward going All in YMatrix.
This article explores how a leading pharmaceutical retail group chose YMatrix as its core database to tackle spiking write loads, heavy data processing, and explosive data growth. With multi-node concurrent writes, adaptive compression, and an HTAP hyper-converged architecture, the company not only broke through legacy bottlenecks in ingestion and month-end closing, but also laid a solid, unified data foundation for future intelligent operations.
How does a pharma retail giant with more than 16,000 stores complete month-end closing efficiently? Amid the digital wave, the company’s legacy closing system struggled under business expansion—frequent UI freezes, delayed reports, and mounting data backlogs hampered timely decision-making. Leadership was forced to steer with outdated dashboards—this was the reality then. After adopting the YMatrix hyper-converged database, everything changed.
Powered by its HTAP architecture, node-level concurrent writes, and adaptive compression, YMatrix cracked the month-end closing challenge and accelerated the company’s finance digital transformation—turning data into a true engine for decision-making.
Founded in 1999, this pharmaceutical group ranks among the top three in China’s drug retail chains. As of year-end 2022, it ranked 361st by market capitalization among 4,976 A-share–listed companies. By September 30, 2024, the group recorded RMB 19.024 billion (tax-inclusive) in revenue for the first three quarters of 2024, operated over 16,000 stores, and had O2O drug delivery services covering nearly ten thousand locations nationwide.
The group employs over 50,000 people, including nearly 20,000 pharmacy professionals. It has been recognized for years as “No. 2 by sales among China’s chain pharmacies,” a “Top 500 Service Enterprise in China,” a “Top 100 Comprehensive Strength Chain Pharmacy,” a “Top 100 Private Enterprise in Guangdong,” and an “Outstanding Enterprise in Guangzhou.” With chain-store growth as its core and strong digital operations, the company holds a significant position in pharma retail.
The group uses the YonBIP enterprise digital platform for month-end closing, aiming to ensure timely, accurate monthly financials to support management decisions. Key scopes include:
Core accounting: Expense reimbursements, corporate payments, fixed assets, payroll, and other voucher entries. Bank journal reconciliation is critical—large volumes of daily transactions must precisely match bank statements.
Closing & reporting: During general ledger closing, the system processes massive data for profit carry-forward, exchange gains/losses, and multi-ledger conversions, then produces the balance sheet, income statement, and cash-flow statement—vital for internal strategy and external disclosure.
Balance sheet: A clear view of assets, liabilities, and equity to gauge financial strength and solvency.
Income statement: Revenue, costs, and profit to reflect operating performance.
Cash-flow statement: Cash inflows/outflows to ensure a healthy, stable cash position.
Tax & compliance: Accurate calculation and on-time filing of taxes based on financial data, with complete documentation ready for audits. In addition, a monthly funds report covers cash flows from operating, investing, and financing activities to guide capital planning and allocation.
“Others read reports to decide—while we stare at progress bars and pray.” This was the prevailing sentiment.
Historically, the enterprise relied on Oracle for data storage and processing. With continued expansion, soaring store counts, and skyrocketing data volumes, growing demands for refined financial management exposed mounting issues—turning the once-reliable Oracle system into a “roadblock.”
Data deluge overwhelmed the system Daily nationwide activity generated massive volumes of vouchers (expenses, payments, payroll). New vouchers reached 30 million per month and 300 million per year, pushing storage to its limits and driving up costs.
Real-time decisions became a luxury With 16,600+ stores and complex, time-sensitive logic, generating balance sheets, income statements, and cash-flow statements stretched from minutes to hours—leadership lost real-time visibility into solvency and cash health.
Month-end turned into trench warfare At crunch time the system often “went on strike.” Voucher writes were painfully slow; concurrent writes could freeze the system. Even simple queries took minutes; complex ones, half a day. Storage maintenance grew harder as data ballooned.
These issues impeded management’s access to, analysis of, and confidence in financial data—slowing improvements in merchandising, pricing, marketing, and operations.
Among many database options, YMatrix stood out for superior product capabilities and precise alignment with the business scenario.
A true hyper-converged database: YMatrix’s HTAP capabilities have been proven across multiple retail enterprises, demonstrating reliability and efficiency in complex settings. Rigorous technical due diligence showed YMatrix could fully meet month-end and other mission-critical needs.
HTAP: Transactions and analytics on one system—eliminating dual-stack redundancy and latency.
TP (Transactional) domain: Handles in-month finance ops—GL management, fixed assets, and statement generation—for accuracy and timeliness.
AP (Analytical) domain: Cross-period queries and multidimensional reporting—supporting month-end decisions with consistent, stable data.
In-database streaming engine: Data syncs in real time between TP (business) and AP (analytics) zones—pushing report generation into the sub-second/seconds era and keeping management fed with timely insights.
Write storm: Millions/hour concurrent writes; peak withstands surges of 1,000,000 rows.
Compression “magic”: Adaptive compression shrinks data to ~1/10—taming growth and cutting storage costs.
YMatrix’s elastic scalability handles rapid business and data growth with ease.
Seamless YonBIP compatibility is another edge—YMatrix integrates smoothly with the YonBIP platform, enabling a stable migration without major process changes, reducing costs and disruption, and ensuring business continuity.
Finally, the experienced YMatrix engineering team provides end-to-end technical support and assurance throughout adoption and operations.
YMatrix’s distributed HTAP solution unifies transactional processing and analytics, meeting dual needs for high-volume finance operations and timely reporting (e.g., data dashboards, balance analysis).
At the data-coordination layer, the Domino in-database streaming engine keeps TP and AP in real-time sync—an internal high-speed lane that delivers timely, accurate data for reports and balance analyses. Combined with the MARS3 storage engine’s adaptive compression, ODS data is stored in multi-tier compressed layers to reduce redundancy.
At the deployment layer, the cluster ran on five physical nodes: one primary node for connection management and orchestration—the brain of the cluster; and four data nodes for storage and processing.
TP data nodes focus on transactional workloads (voucher entry, asset accounting) to ensure high-frequency operations run efficiently.
AP data nodes focus on data processing for financial reporting, analytics, and month-end calculations.
With YMatrix’s distributed HTAP architecture, YonBIP achieved integrated finance-operations data sharing, powering upper-layer modules (event accounting, financial accounting, intelligent analytics, etc.) with a unified data backbone. The result: efficient, stable transactions and real-time analytical processing—showcasing YMatrix’s strengths in high-volume writes and analytical performance.
The system no longer chases the business—data now propels the enterprise forward.
Proven in production: YMatrix sustained stable, efficient operations for 30 million new vouchers per month, ensuring multiple smooth month-end closes. Peak TPS exceeded 100,000+, while CPU and memory stayed safely within limits.
Efficiency leap: Month-end cycles shrank to T+2; report generation sped up with real-time updates; finance teams no longer worked through the night.
Smarter decisions: Leadership accessed timely data to fine-tune pricing; gross margin climbed by 15%.
Deeper insights: Finance teams mined historical data to forecast funding needs and cash flows, enabling forward-looking planning.
Cost plunge: Hardware spending down 60%; Ops transformed from “firefighting” to “strategy,” saving tens of millions of RMB annually in O&M.
What made this possible
Peak-shaving writes: Parallelized ingestion; >100k TPS; supports 1M rows/hour concentrated writes; during month-end, data from 200 stores surged in parallel with zero freezes.
Adaptive compression: MARS3 applies multi-level, type-aware compression—successfully handling a month-end growth spike from 753 GB to 1,244 GB (+65%) in February.
Real-time in-DB streaming: Stream transforms/analytics inside the database—no external pipelines. Financial report queries respond in seconds, enabling true T+2 month-end.
One-stack HTAP: One database for both transactions and analytics—lowering technical complexity and maintenance costs.
ACID-grade consistency: A single source of truth avoids cross-system drift between OLTP and OLAP, ensuring accurate, reliable financial statements.
When the second hand keeps pace with business, growth no longer arrives late.
From “praying to progress bars” to “winning by the second,” this victory belongs not only to technology, but also to the courage to reshape business with data. YMatrix will continue to innovate and optimize performance.
Looking ahead, YMatrix will leverage resources even more efficiently and further enhance performance in ultra-large financial data scenarios—helping pharma retailers stand out in fierce competition and achieve greater success. As the company’s CIO concluded at an industry summit, “HTAP hyper-convergence is not a choice—it’s a survival imperative.”
Smart Manufacturing at Scale with YMatrix HTAP: Real-Time Ingestion & Unified Analytics
How YMatrix Helps Farasis Energy Achieve Smart-Factory Analytics in Seconds
How YMatrix Domino Replaces Lambda, Kappa, Flink, and Spark with One Engine🚀
From Greenplum to YMatrix: Migrating Core Business Data for a Leading Power-Battery Manufacturer
Ganfeng Lithium: Real-Time Reporting at Scale with YMatrix
SERES × YMatrix: 3-Hour Migration of 2.13TB, 50% Faster Multi-Scenario Queries