Script: Computing Table Size

简介:
This script calculates the average row size for all tables in a schema. It generates a script (getAvgCol.sql) from USER_TABLES and then runs it. The following type of SELECT is generated for each table in USER_TABLES: SELECT round(avg(nvl(vsize(COL1),0)) + round(avg(nvl(vsize(COL2),0)) + ... + round(avg(nvl(vsize(COLn),0)) Where n=# of cols. on the table Tables with LONG and LOB columns will not report row size properly. Also tables with object types will throw the following error and will also not report row size properly: ORA-00932: inconsistent datatypes ============= Sample Output ============= ACCOUNTS 6 ACCTS 39 ACCT_ADDRS 38 BAD_DATA 116 BASE1 6 BONUS CEG1 11 CHESS_SAVE CHESS_SAVE_PLAYER CITIES 36 COMPANY_SUMMARY 60 CR_FILES 113

Script:

 

exit


本文转自maclean_007 51CTO博客,原文链接:
http://blog.51cto.com/maclean/1276697

相关文章
MGA (Managed Global Area) Reference Note (Doc ID 2638904.1)
MGA (Managed Global Area) Reference Note (Doc ID 2638904.1)
226 0
SAP WM中阶Storage Type的Capacity Check – Check based on maximum quantity per bin in storage type.
SAP WM中阶Storage Type的Capacity Check – Check based on maximum quantity per bin in storage type.
SAP WM中阶Storage Type的Capacity Check – Check based on maximum quantity per bin in storage type.
SAP WM中阶Storage Type的Capacity Check – Usage check based on material
SAP WM中阶Storage Type的Capacity Check – Usage check based on material
SAP WM中阶Storage Type的Capacity Check – Usage check based on material
SAP WM 为Storage Type 004激活SUM报错 - Storage types without pick-point stor.type require partial pallet
SAP WM 为Storage Type 004激活SUM报错 - Storage types without pick-point stor.type require partial pallet
SAP WM 为Storage Type 004激活SUM报错 - Storage types without pick-point stor.type require partial pallet
SAP Fiori Elements - fixed value help data request and how drop down list entry is rendered
SAP Fiori Elements - fixed value help data request and how drop down list entry is rendered
103 0
SAP Fiori Elements - fixed value help data request and how drop down list entry is rendered
SAP Fiori Elements - how drop down list with description is correctly rendered
SAP Fiori Elements - how drop down list with description is correctly rendered
108 0
SAP Fiori Elements - how drop down list with description is correctly rendered
Fiori Elements detail table data request logic
Fiori Elements detail table data request logic
101 0
Fiori Elements detail table data request logic
Fiori elements:when smart template is entered for first time, no data filled
Fiori elements:when smart template is entered for first time, no data filled
Fiori elements:when smart template is entered for first time, no data filled
the title and note has maintained the same text type
the title and note has maintained the same text type
81 0
the title and note has maintained the same text type
|
XML JavaScript 前端开发