Network Security Internet Technology Development Database Servers Mobile Phone Android Software Apple Software Computer Software News IT Information

In addition to Weibo, there is also WeChat

Please pay attention

WeChat public account

Shulou

Oracle recovery of high water mark

2025-03-17 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Database >

Share

Shulou(Shulou.com)06/01 Report--

Select round ((1-a.used/b.num_total) * 100Pol 0) percent from

(SELECT COUNT (DISTINCT SUBSTR (rowid,1,15)) Used FROM table name) a

(select blocks num_total from dba_tables where table_name=' table name 'and wner=' username') b

By comparing the blocks field in dba_tables with the field with data, using 1 minus to calculate the percentage of blocks without data (generally, if it exceeds 20%, it needs to be recycled) to determine whether the high water mark needs to be reclaimed.

SQL > alter table test_shrik enable row movement

SQL > alter table test_shrik shrink space

SQL > select t.tableroomname memorialBLOCKS MagiceEMPTYBLOCKSreNUMachirows

From user_tables t

Where table_name = upper ('test_shrik')

Exec dbms_stats.gather_table_stats ('sys','test_shrik')

SQL > select t.tableroomname memorialBLOCKS MagiceEMPTYBLOCKSreNUMachirows

From user_tables t

Where table_name = upper ('test_shrik')

The high water line has dropped.

Welcome to subscribe "Shulou Technology Information " to get latest news, interesting things and hot topics in the IT industry, and controls the hottest and latest Internet news, technology news and IT industry trends.

Views: 0

*The comments in the above article only represent the author's personal views and do not represent the views and positions of this website. If you have more insights, please feel free to contribute and share.

Share To

Database

Wechat

© 2024 shulou.com SLNews company. All rights reserved.

12
Report