OceanBase logo

OceanBase

A unified distributed database ready for your transactional, analytical, and AI workloads.

Product Overview
DEPLOY YOUR WAY

OceanBase Cloud

The best way to deploy and scale OceanBase

OceanBase Enterprise

Run and manage OceanBase on your infra

TRY OPEN SOURCE

OceanBase Community Edition

The free, open-source distributed database

OceanBase seekdb

Open source AI native search database

Customer Stories

Real-world success stories from enterprises across diverse industries.

View All
BY USE CASES

Mission-Critical Transactions

Global & Multicloud Application

Elastic Scaling for Peak Traffic

Real-time Analytics

Active Geo-redundancy

Database Consolidation

Resources

Comprehensive knowledge hub for OceanBase.

Blog

Live Demos

Training & Certification

Documentation

Official technical guides, tutorials, API references, and manuals for all OceanBase products.

View All
PRODUCTS

OceanBase Cloud

OceanBase Database

Tools

Connectors and Middleware

QUICK START

OceanBase Cloud

OceanBase Database

BEST PRACTICES

Practical guides for utilizing OceanBase more effectively and conveniently

Company

Learn more about OceanBase – our company, partnerships, and trust and security initiatives.

About OceanBase

Partner

Trust Center

Contact Us

International - English
中国站 - 简体中文
日本 - 日本語
Sign In
Start on Cloud

OceanBase

A unified distributed database ready for your transactional, analytical, and AI workloads.

Product Overview
DEPLOY YOUR WAY

OceanBase Cloud

The best way to deploy and scale OceanBase

OceanBase Enterprise

Run and manage OceanBase on your infra

TRY OPEN SOURCE

OceanBase Community Edition

The free, open-source distributed database

OceanBase seekdb

Open source AI native search database

Customer Stories

Real-world success stories from enterprises across diverse industries.

View All
BY USE CASES

Mission-Critical Transactions

Global & Multicloud Application

Elastic Scaling for Peak Traffic

Real-time Analytics

Active Geo-redundancy

Database Consolidation

Comprehensive knowledge hub for OceanBase.

Blog

Live Demos

Training & Certification

Documentation

Official technical guides, tutorials, API references, and manuals for all OceanBase products.

View All
PRODUCTS
OceanBase CloudOceanBase Database
ToolsConnectors and Middleware
QUICK START
OceanBase CloudOceanBase Database
BEST PRACTICES

Practical guides for utilizing OceanBase more effectively and conveniently

Learn more about OceanBase – our company, partnerships, and trust and security initiatives.

About OceanBase

Partner

Trust Center

Contact Us

Start on Cloud
编组
All Products
    • Databases
    • iconOceanBase Database
    • iconOceanBase Cloud
    • iconOceanBase Tugraph
    • iconInteractive Tutorials
    • iconOceanBase Best Practices
    • Tools
    • iconOceanBase Cloud Platform
    • iconOceanBase Migration Service
    • iconOceanBase Developer Center
    • iconOceanBase Migration Assessment
    • iconOceanBase Admin Tool
    • iconOceanBase Loader and Dumper
    • iconOceanBase Deployer
    • iconKubernetes operator for OceanBase
    • iconOceanBase Diagnostic Tool
    • iconOceanBase Binlog Service
    • Connectors and Middleware
    • iconOceanBase Database Proxy
    • iconEmbedded SQL in C for OceanBase
    • iconOceanBase Call Interface
    • iconOceanBase Connector/C
    • iconOceanBase Connector/J
    • iconOceanBase Connector/ODBC
    • iconOceanBase Connector/NET
icon

OceanBase Database

SQL - V4.4.2

    Download PDF

    OceanBase logo

    The Unified Distributed Database for the AI Era.

    Follow Us
    Products
    OceanBase CloudOceanBase EnterpriseOceanBase Community EditionOceanBase seekdb
    Resources
    DocsBlogLive DemosTraining & CertificationTicket
    Company
    About OceanBaseTrust CenterLegalPartnerContact Us
    Follow Us

    © OceanBase 2026. All rights reserved

    Cloud Service AgreementPrivacy PolicySecurity
    Contact Us
    Document Feedback
    1. Documentation Center
    2. OceanBase Database
    3. SQL
    4. V4.4.2
    iconOceanBase Database
    SQL - V 4.4.2
    Databases
    • OceanBase Database
    • OceanBase Cloud
    • OceanBase Tugraph
    • Interactive Tutorials
    • OceanBase Best Practices
    Tools
    • OceanBase Cloud Platform
    • OceanBase Migration Service
    • OceanBase Developer Center
    • OceanBase Migration Assessment
    • OceanBase Admin Tool
    • OceanBase Loader and Dumper
    • OceanBase Deployer
    • Kubernetes operator for OceanBase
    • OceanBase Diagnostic Tool
    • OceanBase Binlog Service
    Connectors and Middleware
    • OceanBase Database Proxy
    • Embedded SQL in C for OceanBase
    • OceanBase Call Interface
    • OceanBase Connector/C
    • OceanBase Connector/J
    • OceanBase Connector/ODBC
    • OceanBase Connector/NET
    SQL
    KV
    • V 4.6.0
    • V 4.4.2
    • V 4.3.5
    • V 4.3.3
    • V 4.3.1
    • V 4.3.0
    • V 4.2.5
    • V 4.2.2
    • V 4.2.1
    • V 4.2.0
    • V 4.1.0
    • V 4.0.0
    • V 3.1.4 and earlier

    Overview

    Last Updated:2026-04-23 11:34:06  Updated
    Share
    What is on this page
    What is query acceleration
    How to accelerate queries
    What are the methods for query acceleration
    When to accelerate queries
    References

    folded

    Share

    What is query acceleration

    In analytical processing (AP) scenarios, a single query often needs to scan a large amount of data, perform complex aggregations and joins, and the query response time (RT) and resource utilization directly determine the analysis efficiency and business experience. Query acceleration refers to the process of optimizing the optimizer, parallel execution, and targeted configuration to make analytical SQL run faster, more stably, and with less resource consumption. This allows for shorter response times and more predictable resource usage without significantly rewriting business SQL.

    How to accelerate queries

    OceanBase Database accelerates queries in AP scenarios through two main approaches:

    • On the optimizer side: The optimizer generates optimal execution plans based on accurate and timely statistics (including rowstore/columnstore path selection, distributed plans, and SkipIndex utilization), avoiding high-cost plans such as full table scans on large tables and incorrect join orders.
    • On the execution side: Parallel queries (multi-threaded or multi-node collaboration) fully utilize CPU and I/O resources, reducing single-query RT. Combined with appropriate parallelism (manual DOP or auto DOP), it accelerates queries while controlling resource contention.

    What are the methods for query acceleration

    This section provides actionable configuration and tuning methods based on the two approaches mentioned above, along with table structure and index design considerations. The relevant documentation is as follows:

    Method
    Documentation
    Description
    Table structure and index design Data table design and query optimization in AP scenarios Explains how to design data tables to lay a solid foundation for query acceleration in AP scenarios, from storage format selection, primary key and partition design, to index usage in HTAP scenarios. This provides a better physical basis for subsequent statistics and parallel configurations.
    Statistics Statistics Introduces the role of optimizer statistics in AP scenarios, as well as table-level and column-level statistics, histograms, automatic and manual collection, and online collection mechanisms. It emphasizes AP-specific optimization strategies: window maintenance configuration, statistics collection strategies for large tables (parallelism, histograms, partition granularity, sampling, and locking), ensuring the optimizer has real-time and accurate statistics to generate high-quality execution plans.
    Parallelism (DOP) Query parallelism selection Introduces the concept of parallel queries (DOP), differences in parallelism requirements between OLTP and OLAP, and distributed plans and operator parallelism. It explains how to accelerate analytical queries using manual DOP or auto DOP, and provides configuration recommendations for auto DOP, such as parallel_min_scan_time_threshold and parallel_degree_limit, to balance RT improvement and resource control.

    These documents can be used in conjunction with OceanBase Database's general SQL optimization, distributed execution plans, and parallel execution sections for a deeper understanding of plan generation, cost models, and execution details.

    When to accelerate queries

    In the following scenarios, it is recommended to actively configure and tune query acceleration:

    • Analyzing large tables or partitioned tables: When table/partition data volume is very large, full table or large range scans take a long time. Accurate statistics are needed to select rowstore/columnstore paths and scan ranges, and parallelism can be used to improve throughput and reduce RT.
    • After batch imports or large-scale updates: Significant data changes may result in outdated or inaccurate default statistics, leading to suboptimal execution plans. Online statistics collection, window maintenance, or manual collection can be used, and parallelism can be enabled or adjusted as needed.
    • When analysis query RT does not meet requirements: If the bottleneck is identified as plans or parallel resources, check if statistics are up-to-date and accurate, and consider enabling auto DOP or increasing manual DOP and related parameters.
    • When resource contention occurs due to concurrent queries: High system load after enabling parallelism may require limiting parallelism thresholds and upper limits using parameters like parallel_degree_limit and parallel_min_scan_time_threshold, or using resource groups/tenant isolation for overall control.

    For the above scenarios, you can refer to the Data table design and query optimization in AP scenarios, Statistics, and Query parallelism selection documents mentioned in the previous section. Follow the order of "table structure, then statistics and parallelism" to configure and tune step by step. This will help you achieve better execution plans, shorter response times, and more controlled resource usage in AP scenarios.

    References

    For more information about execution plans, cost models, and parallel execution principles, see the SQL optimization, Distributed execution plans, and Parallel execution sections of OceanBase Database.

    Previous topic

    URL external tables of OceanBase Database
    Last

    Next topic

    Statistics
    Next
    What is on this page
    What is query acceleration
    How to accelerate queries
    What are the methods for query acceleration
    When to accelerate queries
    References