数据库
令什么
这个作者很懒,什么都没留下…
展开
-
oracle统计表空间大小
oracle统计表空间大小 select sum(bytes)/1024/1024 from dba_segments where segment_name='xx'原创 2021-06-16 16:15:26 · 173 阅读 · 0 评论 -
greenplum查询元信息,统计空间大小
greenplum查询元信息 1.普通表 select * from pg_tables 2.所有表,包括外部表 select * from information_schema.tables 3.统计表占用空间大小 select pg_size_pretty(pg_total_relation_size('xxx')) 4.统计某个schema占用空间(GB) select sum(pg_total_relation_size(schemaname||'.'||tablename))/1024/1024原创 2021-06-16 16:12:42 · 688 阅读 · 0 评论 -
oracle获取主键,索引,元信息
二、 oracle获取主键,索引,元信息 1.primary key和unique select c.owner,c.table_name,c.column_name,a.constraint_type from all_constraints a,all_cons_columns c where a.constraint_name=c.constraint_name and a.owner=c.owner and (a.constraint_type='P' or a.constraint_type=原创 2021-06-16 15:36:54 · 576 阅读 · 0 评论