一、获取某个用户下Oracle某个表行记录的长度这个长度是表字段定义的长度,获取方法:
- select owner,
- table_name,
- column_name,
- data_type,
- data_length,
- sum(case data_type
- when "DATE" then
- 7
- when "NUMBER" then
- 22
- else
- data_length
- end) length
- from all_tab_cols
- where table_name = upper("表名")
- and DATA_TYPE
- and owner=upper("用户名")
- group by rollup((owner, table_name, column_name, data_type, data_length))
二、根据表数据所占总字节数和表记录数来获取实际的每行记录的平均长度获取表数据的所有字节数:
- select segment_name,
- segment_type,
- nvl(sum(bytes), 0)
- from user_segments
- where segment_type = "TABLE"
- and segment_name = "表名"
- group by segment_name, segment_type
- order by 3 desc;
获取表总记录数:
select count(*)
from 表名 两者求商即得每行记录的平均字节数。Ubuntu 下 MySQL 数据自执行备份Oracle:SQL Loader的导入文本数据相关资讯 oracle
- [INS-32052] Oracle基目录和Oracle (07/22/2014 07:41:41)
- Oracle 4个大对象(lobs)数据类型 (02/03/2013 12:33:05)
- Oracle按时间段分组统计 (07/26/2012 10:36:48)
| - [Oracle] dbms_metadata.get_ddl的 (07/12/2013 07:37:30)
- Liferay Portal 配置使用Oracle和 (07/31/2012 20:07:18)
- Concurrent Request:Inactive (07/20/2012 07:44:05)
|
本文评论 查看全部评论 (0)