自己看的
ubuntu12.04 server version
oracle11g
sqldeveloper
一些基础概念
tablespace 表空间 = 若干段组成
segment 段 = 若干区段组成
extent 区段 = 若干相邻的数据块
block 数据块
如何了解table,index,table partition大小
结合数据库的常用表,了解数据库的一些信息
-- check all user;
select * from all_users;
-- current oracle database name
select ora_database_name from dual
-- current user object
select owner, object_type, status, count(*) count# from all_objects where owner = 'SCOTT' group by owner, object_type, status;
SELECT object_type FROM user_objects GROUP BY object_type;
-- all object own by current user
select * from user_objects where object_type = 'TABLE PARTITION';
select * from user_objects where object_type = 'SEQUENCE';
select * from user_objects where object_type = 'TRIGGER';
select * from user_objects where object_type = 'INDEX';
select * from user_objects where object_type = 'TABLE';
select * from user_tablespaces;
select * from user_sequences;
select * from USER_TABLES;
select * from USER_TRIGGERS;
select * from user_indexes;
select * from user_procedures;
-- good resource, segment type (table, table partition, index) check capacity of segement type
-- check capacity, come here
select * from user_segments;
-- consume disk space
select tablespace_name, initial_extent/1024/1024, next_extent/1024/1024, min_extents/1024/1024, max_extents/1024/1024, max_size/1024/1024 from user_tablespaces;
select segment_type, segment_name, bytes/1024/1024 capacity from user_segments where segment_type = 'TABLE';
select segment_type, segment_name, bytes/1024/1024 capacity from user_segments where segment_type = 'TABLE PARTITION';
select segment_type, segment_name, bytes/1024/1024 capacity from user_segments where segment_type = 'INDEX';
结合oem,了解当前数据库主要空间消耗情况
-- start oem (Oracle Enterprise Manager) in ubuntu
0) $ORACLE_HOME/oc4j/j2ee/oc4j_applications/applications/em/em/WEB-INF/uix-config.xml inaccessible->accessible,
1) emctl start dbconsole
2) https://ubuntu:1158/em/
3) emctl start dbconsole
手动创建表空间 JRD_GPS, TAXI_Temp
Table Partition内存消耗,
(三千万条数据,2G多)
Table Partition索引消耗
(三千万条数据,主键索引4G,吓,其他键1G不到)
- 大小: 29.6 KB
- 大小: 84.5 KB
- 大小: 85.3 KB
- 大小: 144.3 KB
分享到:
相关推荐
Oracle 自学视频教程.part18
1 Oracle 结构组件 目标 1-2 基本结构概述 1-3 Oracle 服务器 1-4 Oracle 实例 1-5 建立连接和创建会话 1-6 Oracle 数据库 1-7 物理结构 1-8 内存结构 1-9 系统全局区(SGA) 1-10 共享池 1-12 库缓存 1-13 数据字典...
oracle自学实盘教程电子课件oracle自学实盘教程电子课件oracle自学实盘教程电子课件
Oracle自学自学笔记.docx
Oracle 自学视频教程.part10
Oracle 自学视频教程.part42
Oracle 自学视频 教程.part01
Oracle 自学视频教程.part45
Oracle 自学视频教程.part16
Oracle 自学视频教程.part34
Oracle 自学视频教程.part38
Oracle 自学视频教程.part21
Oracle 自学视频教程.part36
Oracle 自学视频教程.part35
Oracle 自学视频教程.part19
Oracle 自学视频教程.part49
Oracle 自学视频教程.part50
Oracle 自学视频教程.part28
Oracle 自学视频教程.part47
Oracle 自学视频教程.part41