CelerData Blog

Faster Customer-Facing Analytics With Automatic Materialized Views

Written by Chelsea Wang | Dec 17, 2024 2:16:38 AM

Effective customer-facing analytics demands stringent performance SLAs alongside consistently low query latency. These demands are non-negotiable, and much of the effort to meet those demands lies in the related pre-production work. This article explores how Materialized Views in StarRocks and CelerData Cloud simplify this process and how the latest release of Automatic Materialized Views in CelerData Cloud further accelerates production readiness without compromising performance.


Challenges in Building Customer-Facing Analytics Applications

When developing customer-facing analytics infrastructure, teams face a dual challenge: ensuring the system can meet performance SLAs while remaining scalable as the business grows. However, when faced with a mix of SQL queries, datasets, and performance expectations, data teams are often unsure how to adjust their processes to achieve the desired outcomes.

This is where Materialized Views (MVs) come in. MVs are a proven method for accelerating query performance by pre-computing and storing frequently used results. Yet, creating and managing MVs effectively requires a robust platform that simplifies the process and ensures optimal performance.

StarRocks, a real-time data warehouse purpose-built for customer-facing analytics, enhances the MV experience with advanced query rewrite capabilities. StarRocks MVs automatically optimize queries to leverage materialized views without requiring any SQL changes. This not only reduces the complexity of tuning queries but also accelerates performance.

 

The Complexity of Managing Materialized Views

Despite their benefits, effectively designing and managing StarRocks MVs can pose challenges. To fully harness the power of MVs, teams must:

  • Identify Opportunities for MVs: Understanding the data and pinpointing optimal opportunities for materialized views requires expertise in both query patterns and data distribution.

  • Create Optimized MVs: Setting up MVs with features like partitioning is essential for achieving the best performance.

  • Be familiar with the internals of materialized view rewrites: To create views that can be efficiently rewritten.

  • Design Generalized MVs: Creating versatile MVs that accelerate multiple queries is key to balancing performance and cost. Excessive or overly specific MVs can degrade system performance and inflate your Total Cost of Ownership (TCO).

These challenges often hinder teams from realizing the full benefits of materialized views, resulting in slower production timelines and suboptimal performance for customer-facing analytics.

 

The Solution: Automatic Materialized Views

CelerData Cloud's Automatic Materialized View (Auto-MV) feature eliminates the inherent complexity of MVs. By automating the creation, optimization, and management of MVs, Auto-MV enables teams to fully leverage materialized views without the need for specialized expertise.

 

Why Auto-MV?

Auto-MV addresses three critical areas that perfectly complement the basic StarRocks' MV experience.

  • Ease of Use: Auto-MV automatically recommends materialized views based on query patterns and data distribution, eliminating the steep learning curve and time investment typically required for manual MV setup.

  • Performance Optimization: Auto-MV intelligently selects and applies materialized views during query execution, leveraging StarRocks’ powerful query rewrite capabilities to deliver performance gains without any SQL modifications.

  • Cost Efficiency: Automated MV management minimizes operational overhead, reducing both resource usage and total cost of ownership (TCO).


Capabilities Of Auto-MV in CelerData Cloud

To deliver these benefits, Auto-MV offers the following advanced capabilities:

  1. Create Generalized MVs: Leverage Auto-MV to generate materialized views that serve multiple queries instead of just one. This reduces system overhead while maintaining optimal performance, ensuring efficient resource use.

  2. Guaranteed Rewrites: Auto-MV ensures that recommended materialized views can always be rewritten and utilized at query time, eliminating the need for manual SQL modification.

  3. Merge MVs: You can use Auto-MV to merge multiple materialized views into one or a few generalized MVs, reducing redundancy, improving system performance, and lowering overall costs.

By integrating these capabilities, Auto-MV empowers teams to overcome the challenges of manual MV management, enabling faster production readiness while ensuring compliance with the stringent SLAs of customer-facing analytics applications.

 

Try Auto-MV Right Now for Free

Automatic Materialized Views are now in public preview and available on CelerData Cloud BYOC across all available regions.

You can get started with CelerData Cloud BYOC right now for free. Simply visit Cloud.CelerData.com to claim your 30-day trial and try Auto-MVs for yourself.