
# 系统视图
M-Compatibility模式数据库继承了GaussDB原有的部分系统视图，继承的系统视图如[表1]所示，系统视图的具体定义及视图信息请参见《开发指南》中"系统表和系统视图"章节。
![](https://support.huaweicloud.com/distributed-m-comp-devg-v8-gaussdb/public_sys-resources/note_3.0-zh-cn.png)
- 当前M-Compatibility模式数据库不支持审计能力，gs_auditing、gs_auditing_access和gs_auditing_privilege视图数据为空。
- 当前M-Compatibility模式数据库不支持脱敏能力，gs_masking视图数据为空。
 
 表1M-Compatibility模式数据库继承GaussDB数据库的视图 
| 视图分类           | 视图名称                              |
|:---|:---|
| DATABASE LINKS | gs_db_links                       |
| 分区表            | gs_stat_all_partitions            |
| 分区表            | gs_stat_xact_all_partitions       |
| 分区表            | gs_statio_all_partitions          |
| 审计             | gs_auditing                       |
| 审计             | gs_auditing_access                |
| 审计             | gs_auditing_privilege             |
| 用户和权限管理        | gs_db_privileges                  |
| 用户和权限管理        | gs_labels                         |
| 动态脱敏           | gs_masking                        |
| 通信             | gs_comm_listen_address_ext_info   |
| 通信             | gs_get_listen_address_ext_info    |
| 通信             | gs_static_threadpool_ctrl_status  |
| 段页式存储          | global_gs_seg_datafiles           |
| 段页式存储          | global_gs_seg_extents             |
| 段页式存储          | global_gs_seg_segments            |
| 段页式存储          | global_gs_seg_spc_extents         |
| 段页式存储          | global_gs_seg_spc_segments        |
| 段页式存储          | gs_seg_datafile_layout            |
| 段页式存储          | gs_seg_datafiles                  |
| 段页式存储          | gs_seg_extents                    |
| 段页式存储          | gs_seg_segments                   |
| 段页式存储          | gs_seg_segment_layout             |
| 段页式存储          | gs_seg_spc_segments               |
| 段页式存储          | gs_seg_spc_extents                |
| 段页式存储          | gs_seg_spc_remain_extents         |
| 段页式存储          | gs_seg_spc_remain_segments        |
| SPM计划管理        | gs_spm_sql_baseline               |
| SPM计划管理        | gs_spm_sql_param                  |
| SPM计划管理        | gs_spm_sql_evolution              |
| SPM计划管理        | gs_spm_sys_baseline               |
| 负载管理           | gs_wlm_cgroup_info                |
| 负载管理           | gs_wlm_rebuild_user_resource_pool |
| 负载管理           | gs_wlm_user_info                  |
| OLTP表压缩        | gs_adm_ilmevaluationdetails       |
| OLTP表压缩        | gs_adm_ilmdatamovementpolicies    |
| OLTP表压缩        | gs_adm_ilmobjects                 |
| OLTP表压缩        | gs_adm_ilmparameters              |
| OLTP表压缩        | gs_adm_ilmpolicies                |
| OLTP表压缩        | gs_adm_ilmresults                 |
| OLTP表压缩        | gs_adm_ilmtasks                   |
| OLTP表压缩        | gs_my_ilmevaluationdetails        |
| OLTP表压缩        | gs_my_ilmdatamovementpolicies     |
| OLTP表压缩        | gs_my_ilmobjects                  |
| OLTP表压缩        | gs_my_ilmpolicies                 |
| OLTP表压缩        | gs_my_ilmresults                  |
| OLTP表压缩        | gs_my_ilmtasks                    |
| 物化视图           | gs_matviews                       |
| 其他系统视图         | global_bad_block_info             |
| 其他系统视图         | global_clear_bad_block_info       |
| 其他系统视图         | global_stat_hotkeys_info          |
| 其他系统视图         | global_wal_sender_status          |
| 其他系统视图         | gs_all_control_group_info         |
| 其他系统视图         | gs_all_prepared_statements        |
| 其他系统视图         | gs_bucket_locks                   |
| 其他系统视图         | gs_get_control_group_info         |
| 其他系统视图         | gs_glc_memory_detail              |
| 其他系统视图         | gs_global_archive_status          |
| 其他系统视图         | gs_gsc_memory_detail              |
| 其他系统视图         | gs_libcomm_fd_info                |
| 其他系统视图         | gs_libcomm_memory_info            |
| 其他系统视图         | gs_lsc_memory_detail              |
| 其他系统视图         | gs_my_plan_trace                  |
| 其他系统视图         | gs_session_all_settings           |
| 其他系统视图         | gs_sql_count                      |
| 其他系统视图         | gs_stat_db_cu                     |
| 其他系统视图         | gs_stat_session_cu                |
| 其他系统视图         | gs_total_nodegroup_memory_detail  |
| 其他系统视图         | gs_workload_rule_stat             |
| 其他系统视图         | sys_dummy                         |
| 多租户            | mtd_user （不建议在分布式下使用和查看本视图）       |
| 废弃系统视图         | gs_cluster_resource_info          |
| 废弃系统视图         | gs_session_cpu_statistics         |
| 废弃系统视图         | gs_session_memory_statistics      |
| 废弃系统视图         | gs_wlm_operator_history           |
| 废弃系统视图         | gs_wlm_operator_statistics        |
| 废弃系统视图         | gs_wlm_resource_pool              |
| 废弃系统视图         | gs_wlm_session_history            |
| 废弃系统视图         | gs_wlm_session_info               |
| 废弃系统视图         | gs_wlm_session_info_all           |
| 废弃系统视图         | gs_wlm_session_statistics         |
| 废弃系统视图         | gs_wlm_user_session_info          |
| 废弃系统视图         | gs_wlm_workload_records           |
   
中间视图主要是在分布式上CN用来收集对应视图时使用，具体视图如[表2]所示，不建议用户直接使用。
 表2中间视图 
| gs_local_adm_ilmdatamovementpolicies | gs_local_my_ilmdatamovementpolicies |
|---|---|
| gs_local_adm_ilmevaluationdetails    | gs_local_my_ilmevaluationdetails    |
| gs_local_adm_ilmobjects              | gs_local_my_ilmobjects              |
| gs_local_adm_ilmpolicies             | gs_local_my_ilmpolicies             |
| gs_local_adm_ilmresults              | gs_local_my_ilmresults              |
| gs_local_adm_ilmtasks                | gs_local_my_ilmtasks                |
   
M-Compatibility模式数据库还继承了dv_session_longops、dv_sessions等GaussDB原有的系统视图，在继承GaussDB原有系统视图的同时，在对应系统视图下建立了以gs_为前缀的视图别名，如[表3]所示。 为了保证兼容性，请优先使用带有gs_前缀的别名视图。
 表3M-Compatibility模式数据库系统视图别名 
| 视图名称                                 | 视图别名                                    |
|:---|:---|
| dv_session_longops                   | gs_dv_session_longops                   |
| dv_sessions                          | gs_dv_sessions                          |
| get_global_prepared_xacts            | gs_get_global_prepared_xacts            |
| mpp_tables                           | gs_mpp_tables                           |
| pg_available_extension_versions      | gs_available_extension_versions         |
| pg_available_extensions              | gs_available_extensions                 |
| pg_comm_delay                        | gs_comm_delay                           |
| pg_comm_recv_stream                  | gs_comm_recv_stream                     |
| pg_comm_send_stream                  | gs_comm_send_stream                     |
| pg_comm_status                       | gs_comm_status                          |
| pg_control_group_config              | gs_control_group_config                 |
| pg_cursors                           | gs_cursors                              |
| pg_ext_stats                         | gs_ext_stats                            |
| pg_get_invalid_backends              | gs_get_invalid_backends                 |
| pg_get_senders_catchup_time          | gs_get_senders_catchup_time             |
| pg_group                             | gs_group                                |
| pg_gtt_attached_pids                 | gs_gtt_attached_pids                    |
| pg_gtt_relstats                      | gs_gtt_relstats                         |
| pg_gtt_stats                         | gs_gtt_stats                            |
| pg_indexes                           | gs_indexes                              |
| pg_locks                             | gs_locks                                |
| pg_node_env                          | gs_node_env                             |
| pg_os_threads                        | gs_os_threads                           |
| pg_pooler_status                     | gs_pooler_status                        |
| pg_prepared_statements               | gs_prepared_statements                  |
| pg_prepared_xacts                    | gs_prepared_xacts                       |
| pg_replication_slots                 | gs_replication_slots                    |
| pg_rlspolicies                       | gs_rlspolicies                          |
| pg_roles                             | gs_roles                                |
| pg_rules                             | gs_rules                                |
| pg_running_xacts                     | gs_running_xacts                        |
| pg_seclabels                         | gs_seclabels                            |
| pg_session_iostat                    | gs_session_iostat                       |
| pg_session_wlmstat                   | gs_session_wlmstat                      |
| pg_settings                          | gs_settings                             |
| pg_shadow                            | gs_shadow                               |
| pg_shared_memory_detail              | gs_shared_memory_detail                 |
| pg_stat_activity                     | gs_stat_activity                        |
| pg_stat_activity_ng                  | gs_stat_activity_ng                     |
| pg_stat_all_indexes                  | gs_stat_all_indexes                     |
| pg_stat_all_tables                   | gs_stat_all_tables                      |
| pg_stat_bad_block                    | gs_stat_bad_block                       |
| pg_stat_bgwriter                     | gs_stat_bgwriter                        |
| pg_stat_database                     | gs_stat_database                        |
| pg_stat_database_conflicts           | gs_stat_database_conflicts              |
| pg_stat_replication                  | gs_stat_replication                     |
| pg_stat_sys_indexes                  | gs_stat_sys_indexes                     |
| pg_stat_sys_tables                   | gs_stat_sys_tables                      |
| pg_stat_user_functions               | gs_stat_user_functions                  |
| pg_stat_user_indexes                 | gs_stat_user_indexes                    |
| pg_stat_user_tables                  | gs_stat_user_tables                     |
| pg_stat_xact_all_tables              | gs_stat_xact_all_tables                 |
| pg_stat_xact_sys_tables              | gs_stat_xact_sys_tables                 |
| pg_stat_xact_user_functions          | gs_stat_xact_user_functions             |
| pg_stat_xact_user_tables             | gs_stat_xact_user_tables                |
| pg_statio_all_indexes                | gs_statio_all_indexes                   |
| pg_statio_all_sequences              | gs_statio_all_sequences                 |
| pg_statio_all_tables                 | gs_statio_all_tables                    |
| pg_statio_sys_indexes                | gs_statio_sys_indexes                   |
| pg_statio_sys_sequences              | gs_statio_sys_sequences                 |
| pg_statio_sys_tables                 | gs_statio_sys_tables                    |
| pg_statio_user_indexes               | gs_statio_user_indexes                  |
| pg_statio_user_sequences             | gs_statio_user_sequences                |
| pg_statio_user_tables                | gs_statio_user_tables                   |
| pg_stats                             | gs_stats                                |
| pg_tables                            | gs_tables                               |
| pg_tde_info                          | gs_tde_info                             |
| pg_thread_wait_status                | gs_thread_wait_status                   |
| pg_timezone_abbrevs                  | gs_timezone_abbrevs                     |
| pg_timezone_names                    | gs_timezone_names                       |
| pg_total_memory_detail               | gs_total_memory_detail                  |
| pg_total_user_resource_info          | gs_total_user_resource_info             |
| pg_total_user_resource_info_oid      | gs_total_user_resource_info_oid         |
| pg_user                              | gs_user                                 |
| pg_user_mappings                     | gs_user_mappings                        |
| pg_variable_info                     | gs_variable_info                        |
| pg_views                             | gs_views                                |
| pg_wlm_statistics                    | gs_wlm_statistics                       |
| pgxc_comm_delay                      | gs_pgxc_comm_delay                      |
| pgxc_comm_recv_stream                | gs_pgxc_comm_recv_stream                |
| pgxc_comm_send_stream                | gs_pgxc_comm_send_stream                |
| pgxc_comm_status                     | gs_pgxc_comm_status                     |
| pgxc_get_stat_all_tables             | gs_pgxc_get_stat_all_tables             |
| pgxc_get_table_skewness              | gs_pgxc_get_table_skewness              |
| pgxc_node_env                        | gs_pgxc_node_env                        |
| pgxc_os_threads                      | gs_pgxc_os_threads                      |
| pgxc_prepared_xacts                  | gs_pgxc_prepared_xacts                  |
| pgxc_running_xacts                   | gs_pgxc_running_xacts                   |
| pgxc_sql_count                       | gs_pgxc_sql_count                       |
| pgxc_stat_activity                   | gs_pgxc_stat_activity                   |
| pgxc_stat_activity_with_conninfo_new | gs_pgxc_stat_activity_with_conninfo_new |
| pgxc_stat_bad_block                  | gs_pgxc_stat_bad_block                  |
| pgxc_thread_wait_status              | gs_pgxc_thread_wait_status              |
| pgxc_total_memory_detail             | gs_pgxc_total_memory_detail             |
| pgxc_variable_info                   | gs_pgxc_variable_info                   |
| pgxc_wlm_operator_history            | gs_pgxc_wlm_operator_history            |
| pgxc_wlm_operator_info               | gs_pgxc_wlm_operator_info               |
| pgxc_wlm_operator_statistics         | gs_pgxc_wlm_operator_statistics         |
| pgxc_wlm_rebuild_user_respool        | gs_pgxc_wlm_rebuild_user_respool        |
| pgxc_wlm_session_history             | gs_pgxc_wlm_session_history             |
| pgxc_wlm_session_info                | gs_pgxc_wlm_session_info                |
| pgxc_wlm_session_statistics          | gs_pgxc_wlm_session_statistics          |
| pgxc_wlm_workload_records            | gs_pgxc_wlm_workload_records            |
| pv_file_stat                         | gs_pv_file_stat                         |
| pv_instance_time                     | gs_pv_instance_time                     |
| pv_os_run_info                       | gs_pv_os_run_info                       |
| pv_redo_stat                         | gs_pv_redo_stat                         |
| pv_session_memory                    | gs_pv_session_memory                    |
| pv_session_memory_context            | gs_pv_session_memory_context            |
| pv_session_memory_detail             | gs_pv_session_memory_detail             |
| pv_session_stat                      | gs_pv_session_stat                      |
| pv_session_time                      | gs_pv_session_time                      |
| pv_thread_memory_context             | gs_pv_thread_memory_context             |
| pv_total_memory_detail               | gs_pv_total_memory_detail               |
   
