Oracle 配置参数查询语句、索引查询

阅读更多

Oracle 配置参数查询语句

SELECT NAME,VALUE FROM v$parameter WHERE NAME IN
('sga_max_size','db_cache_size', 
'shared_pool_size','shared_pool_reserved_size','large_pool_size','java_pool_size',
'db_block_size','db_block_buffers','log_buffer','sort_area_size','sort_area_retained_size',
'hash_area_size','sessions','open_cursors' )ORDER BY NAME;

 其他参数设置

alter system set sort_area_size=10240000 scope=spfile;
alter system set sga_max_size=700m scope=spfile;
alter system set sga_target=700m scope=spfile;

 查看目前已经建立的索引

select index_name from all_indexes where table_name = 'PICTURE';

    上面查询语句里面的table_name必须大写,如果写成'picture'则是没有记录。

 

查看 索引(index)/ 表(table) 占用表空间大小

select (sum(bytes)/1024/1024)||'MB' from dba_segments where segment_name = 'PR_ID';
select (sum(bytes)/1024/1024)||'MB' from dba_segments where segment_name = 'PATROL_REPORT';
 

查看某表空间的所有索引

select sum(bytes),segment_name from dba_segments where tablespace_name='LONGMONITOR' and segment_type='INDEX' group by segment_name order by sum(bytes) desc;
 

 

你可能感兴趣的:(Oracle,Cache)