查询视图属性
SELECT VIEWNAME,
OWNER,
CREATEDATE,
DEFINITION
FROM _V_VIEW a
WHERE OBJTYPE = 'VIEW';
查询表结构:
SELECT DATABASE,
OWNER,
NAME,
ATTNUM,
ATTNAME,
FORMAT_TYPE
FROM _V_RELATION_COLUMN
WHERE DATABASE <> Upper('system')
ORDER BY 2,3,4;
数据表记录数:
SELECT RELNAME TABLE_NAME,
CASE
WHEN RELTUPLES < 0 THEN ( ( 2^32 ) * RELREFS ) + ( ( 2^32 ) + RELTUPLES )
ELSE ( ( 2^32 ) * RELREFS ) + ( RELTUPLES )
END NUM_ROWS
FROM _T_CLASS,
_T_OBJECT
WHERE _T_OBJECT.OBJID = _T_CLASS.OID
AND _T_OBJECT.OBJCLASS = 4905;
数据倾斜信息:
SELECT TABLENAME,
OBJTYPE,
OWNER,
CREATEDATE,
USED_BYTES,
SKEW,
USED_BYTES * SKEW * 100
FROM _V_TABLE_ONLY_STORAGE_STAT
WHERE OBJCLASS = 4905
OR OBJCLASS = 4911
ORDER BY TABLENAME;
netezza几个实用小查询
分享好友
分享这个小栈给你的朋友们,一起进步吧。
订阅须知
• 所有用户可根据关注领域订阅专区或所有专区
• 付费订阅:虚拟交易,一经交易不退款;若特殊情况,可3日内客服咨询
• 专区发布评论属默认订阅所评论专区(除付费小栈外)
技术专家
查看更多- 飘絮絮絮丶专家