ODC allows you to view and manage materialized views by using the graphical interface.
Structure tree
You can click the arrow to the left of the name of a materialized view in the list to display its structure tree. The structure tree of an object materialized view can have up to three levels. Right-click an item in the structure tree to perform operations on the item. For more information about the operations, see the Manage section.
Manage
By default, object names are sorted in ascending order based on the first character in the object name in the list. Right-click the target item in the structure tree. In the shortcut menu that appears, ODC provides some operation keys for you to manage the target object. The following table describes the operation keys.
| Operation key | Description |
|---|---|
| View Materialized View Properties | Click this operation key to go to the Properties tab and view the basic information, columns, and code of the materialized view. |
| View Materialized View Data | Click this operation key to go to the Data tab and view the data in the materialized view. |
| Download | Download the SQL file of the materialized view object. |
| Copy | Select the object name, SELECT statement, INSERT statement, UPDATE statement, or DELETE statement. |
| Delete | Delete the current materialized view object. |
Properties and data tabs
Properties tab:
Basic Information: View information such as Materialized View Name, Database, and Storage Mode.
Column: View information such as Column Name, Data Type, and Column Comment of the base table corresponding to the materialized view. Click the refresh icon in the toolbar to refresh the field information.
Index: View the index information of the materialized view.
Constraint: View the constraint information of the materialized view.
DDL: View the definition script of the materialized view. Click the download icon in the toolbar to download the DDL script to a local file. Click the format icon to format the script for easier viewing.
Data tab: View the data in the materialized view. The toolbar provides the following operation keys:
Operation key Description Download Click this operation key to download the result set data. Back to Start Click this operation key to go to the first page. Previous Click this operation key to go to the previous page. Next Click this operation key to go to the next page. Jump to Bottom Click this operation key to go to the last page. Display data volume Set the number of rows to display on the current page. By default, only 1,000 rows are displayed. Search Click this operation key to search for data in the materialized view by using a keyword. Columns Click this operation key to filter the columns to display on the current page. Column Mode Click this operation key to view the data of the selected rows in a table. On the Column Mode page, you can switch between the previous and next rows. In scenarios where a large number of columns are displayed, column mode is convenient for viewing the data of a single row. Manual Refresh Click this operation key to manually refresh the data of the materialized view on the OceanBase Database side. You can select a refresh mode and a parallelism to initiate the manual refresh. View Refresh Records Click this operation key to view the details of recent refresh records. The details include the basic configurations of the materialized view and the types and times of recent refresh records. Refresh Click this operation key to initiate an HTTP request to refresh the display of the materialized view data in ODC.