-- Query Information about all oracle tables, tablespaces, and database connections -- 1. select table_name, num_rows, avg_row_len, num_rows * avg_row_len --, 'delete from' | table_name | ';' from user_tables t order by num_rows * avg_row_len desc; -- 2. query the table space Path ------- select * from dba_data_files twhere t. tablespace_name = 'users'; -- 3. query the table space capacity --------- select dbf. tablespace_name, dbf. totalspace "Total (M)", dbf. total totalblocks as blocks, dfs. freespace "total remaining amount (M)", dfs. freeblocks "remaining blocks", (dfs. freespace/dbf. totalspace) * 100 "idle ratio" from (select t. tablespace_name, sum (t. bytes)/1024/1024 totalspace, sum (t. blocks) totalblocksfrom dba_data_files tgroup by t. tablespace_name) dbf, (select tt. tablespace_name, sum (tt. bytes)/1024/1024 freespace, sum (tt. blocks) freeblocksfrom dba_free_space ttgroup by tt. tablespace_name) dfswhere trim (dbf. tablespace_name) = trim (dfs. tablespace_name); -- 4 select count (*) from v $ process; select value from v $ parameter where name = 'processs'; SELECT osuser,. username, cpu_time/executions/1000000 |'s, SQL _fulltext, machine from v $ session a, v $ sqlarea B where. SQL _address = B. address order by cpu_time/executions desc; Author: dingshuo168