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.3.0

    Download PDF

    OceanBase logo

    The Unified Distributed Database for the AI Era.

    Follow Us
    Products
    OceanBase CloudOceanBase EnterpriseOceanBase Community EditionOceanBase seekdb
    Resources
    DocsBlogWhite PaperLive 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.3.0
    iconOceanBase Database
    SQL - V 4.3.0
    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-15 08:30:01  Updated
    Share
    What is on this page
    Features
    Scenarios
    Considerations
    Limitations
    Operation privileges
    Base tables of materialized views
    References

    folded

    Share

    A materialized view is a special database object that stores the latest copy of query results and is periodically or manually refreshed. Unlike a standard view, which is a virtual table that requires calculations for each access, a materialized view contains a physical copy of the data. Therefore, you can directly query data from a materialized view without executing complex SQL statements. This greatly improves the query performance.

    Materialized views are used to optimize the query performance of complex queries and queries dealing with large amounts of data. Materialized views can contain operations such as aggregation and join operations, and subqueries, and can be indexed and partitioned to further enhance the query performance.

    Features

    • Query performance improvement: Materialized views store query results. Therefore, you do not need to execute query statements for a query, which greatly improves the query performance.
    • Data redundancy: Materialized views consume additional storage space to store query results.
    • Automatic refresh: Materialized views can be automatically and periodically refreshed to keep data consistency with the base table.
    • Support for complex queries: Materialized views store results of complex queries, such as queries involving aggregate functions, and grouping and join operations.

    Scenarios

    • Pre-summarization for frequently executed complex queries: Materialized views are suitable for storing summary data that is frequently calculated, such as monthly and quarterly summaries of sales data. You can use materialized views to avoid frequent calculations of large amounts of raw data.
    • Optimization of common filtering conditions of queries: You can create materialized views to pre-filter data based on specific conditions. This improves the query efficiency.
    • Acceleration of complex join operations: Materialized views are ideal for processing complex queries involving multiple join operations. You can save the results of complex queries in materialized views to speed up subsequent identical or similar queries.
    • Clustering for performance improvement of grouping and aggregation queries: You can use materialized views to store clustered indexes and improve the efficiency of grouping and aggregation queries.

    Considerations

    • Storage consumption: Materialized views consume additional storage space. Therefore, you need to take the disk capacity into account.
    • Refresh costs: The automatic or manual refreshes of materialized views consume system resources. If the data in the base tables changes frequently, refreshes of materialized views may affect the system performance.
    • Data consistency and real-timeliness: Materialized views may not be consistent with base tables in real time. The data in a materialized view is not automatically updated along with the base table. If the base table data changes, the data in the materialized view may become outdated and needs to be refreshed periodically to maintain data consistency.
    • Design complexity: When you design and create a materialized view, you must consider the expected query methods and data access methods to optimize the performance.

    Limitations

    • You cannot create a materialized view on normal or materialized views.

    • You cannot perform INSERT, DELETE, or ALTER operations on a materialized view.

    • You cannot rename a materialized view.

    • DDL operations on the base table of a materialized view may cause refresh failures of the materialized view.

      • To perform a full refresh of a materialized view, the column types of the materialized view must match those of the base table.
      • To perform an incremental refresh of a materialized view, you must create a materialized view log on the base table. Some DDL operations on such base tables will be blocked.
    • Materialized views do not support the XML data type.

    • Materialized views do not support table-level restore.

    • A materialized view that is separately dropped is not moved to the recycle bin. When you execute the DROP DATABASE statement to drop a database, materialized views in the database are moved to the recycle bin along with the database.

    Operation privileges

    • You need the CREATE TABLE privilege to create a materialized view.
    • You need the DROP TABLE privilege to drop a materialized view.
    • You need the SELECT privilege on all base tables to fully refresh a materialized view.
    • You need the SELECT privilege on all base tables and the corresponding materialized view logs to perform an incremental refresh of a materialized view.
    • You can grant only the SELECT privilege on a materialized view. Materialized views do not support other DML operations.

    Base tables of materialized views

    In a database, the base table of a materialized view is the original data table or view referenced to create the materialized view.

    Type
    Can be used as a base table
    Common table Yes
    Standard view No
    Materialized view No
    Synonym No

    References

    • Create a materialized view
    • Query a materialized view
    • Drop a materialized view
    • Refresh a materialized view

    Previous topic

    Manage standard views
    Last

    Next topic

    Create a materialized view
    Next
    What is on this page
    Features
    Scenarios
    Considerations
    Limitations
    Operation privileges
    Base tables of materialized views
    References