标签:
--某个表中的字段及字段类型代码
SELECT c.colname, c.coltype,t.owner FROM syscolumns c, systables t WHERE c.tabid = t.tabid AND t.tabname = ‘dm_plc_policy‘
--查看数据库临时表空间使用情况
select pagesize,chksize,nfree from sysmaster:syschunks where dbsnum in(select dbsnum from sysmaster:sysdbspaces where name like ‘tmp%‘)
---查看存储过程执行时间
select task_code,FN_DEV_DATETIME(task_lendtime,task_lstarttime,3) as task_exetime from task_def where task_valid=‘1‘ order by 2 desc
---查看表大小
select trim(t1.tabname) tabname , trunc ( sum ( t2.pe_size * 16384 / ( 1024 * 1024 ) ),2 ) total_size from sysmaster:systabnames t1 , sysmaster:sysptnext t2 , systables t
where t1.partnum = t2.pe_partnum and t1.tabname = t.tabname and t.tabname=‘dm_plc_policy‘ group by 1;
标签:
原文地址:http://www.cnblogs.com/sarahs/p/5552078.html