`
byebyegov5qq
  • 浏览: 1212891 次
文章分类
社区版块
存档分类
最新评论

Oracle table fragmentation how to calculate or get the actual used blocks of the table

 
阅读更多

Oracle table fragmentation how to calculate or get the actual used blocks of the table

from:http://www.almohem.com/oracle/space-managment/oracle-table-fragmentation-how-to-calculate-or-get-the-actual-used-blocks-of-the-table/

Oracle table fragmentation, how to calculate used block of the table ?


Ans:
1. To get the total space allocated to the table (this includes : used blocks+fragmentation) you can select bytes
from dba_segments :

SQL> select bytes/1024/1024
from dba_segments where segment_name = 'EI_AIR_REQ_LOG';

BYTES/1024/1024
---------------
            472

2. Select number of rows :

SQL> select count(*) from M_EAI_WMPROD.EI_AIR_REQ_LOG;

  COUNT(*)
----------
    300094

3. Select actual blocks used by the this table :
SQL>  SELECT
COUNT(DISTINCT DBMS_ROWID.ROWID_BLOCK_NUMBER(rowid)||
DBMS_ROWID.ROWID_RELATIVE_FNO(rowid))
"Used" from M_EAI_WMPROD.EI_AIR_REQ_LOG;

      Used
----------
     60021

4. Translate the block number to mega bytes (block size = 8192 byte) as follow
SQL> select 60021*8192/1024/1024 "MB Used" from dual;

   MB Used
----------
468.914063

SQL>

As you can see from this example this table does not contains much fragmentation and hence does not require storage reorganization.



分享到:
评论

相关推荐

    Mnesia table fragmentation 过程及算法分析

    Mnesia table fragmentation 过程及算法分析。erlang就算在64位下dets的空间限制仍旧是2g,同样影响了mnesia,如果有更大需求,就必须使用Mnesia的 table fragmentation 技术

    微软内部资料-SQL性能优化5

    The only source of any storage location information is the sysindexes table, which keeps track of the address of the root page for every index, and the first IAM page for the index or table....

    英文原版-Android Fragmentation Management Howto 1st Edition

    Learn how to write apps that work on any Android version Ready to use code to solve any compatibility issue Get hands-on with the biggest issue that faces Android developers. ,解压密码 share.weimo....

    操作系统第8章作业

    how would each of the first-fit, best-fit, and worst-fit algorithms place processes of 212 KB, 417 KB, 112 KB, and 426 KB (in order)? Which algorithm makes the most efficient use of memory? 3、On a ...

    TCP IP Illustrated, Vol 1 The Protocols 2nd.pdf

    While many people consider this a tool to be used for diagnosing network problems, it is also a powerful tool for understanding how the network protocols operate, which is the goal of this book. ...

    王小平版遗传算法的光盘源代码

    this routine is used to test the best-of-generation individual against a separate set of test cases which were not used in training (i.e., in generating the fitness values which drive selection). ...

    Nmap in the Enterprise: Your Guide to Network Scanning.pdf

    It is most often used by network administrators and IT security professionals to scan corporate networks, looking for live hosts, specific services, or specific operating systems. Part of the beauty ...

    Understanding the Low Fragmentation heap(LFH)

    This document talks about Low Fragmentation Heap on Windows. It's very useful for us to debug application crash issue which is caused by LFH corruption issue. Blackhat USA 2010 Chris Valasek X-...

    Android Apprentice (Third Edition) Beginning Android Development

    how to work with the most common controls and APIs used by Android developers around the world. And these aren’t simple apps, either; you’ll build everything from a simple game, to a checklist ...

    HTML Definitive Guide- English Original

    fragmentation above all else—which leads to a lot of time-consuming reconciliation around how potential features and enhancements may work. The standards body for HTML is the World Wide Web ...

    Agricultural fragmentation of the Nile Delta; a modeling

    Agricultural fragmentation of the Nile Delta; a modeling

    Agile.Android.1484297008

    This concise book walks you through how to get unit testing and test driven development done on Android, specifically using JUnit 4. You'll learn how to do agile development quickly and correctly, ...

    Pro.SQL.Server.Internals

    The book provides a solid road map for understanding the depth and power of the SQL Server database server and teaches how to get the most from the platform and keep your databases running at the ...

    Agile Swift(Apress,2016)

    This short step by step guide walks you through unit testing, mocking and continuous integration and how to get these key ingredients running in your Swift projects. This book also looks at how to ...

    Application of fragmentation research

    Application of fragmentation research

    NexusDB Memory Manager 3.03 Full Source

    The Nexus Memory Manager helps prevent this by using a multi stage allocation system which preallocatessmall chunks of memory and leases parts of them to the application, whenever required. Inaddition...

    BURNINTEST--硬件检测工具

    the major sub-systems of a computer to be simultaneously tested for reliability and stability. <For more details see the online help> Status ====== This is a shareware program. This means that you ...

    Addison Wesley.TCP.IP.Illustrated.Volume.1.The.Protocols.chm

    Whether you are new to TCP/IP or you have read other books on the subject, you will come away with an increased understanding of how and why TCP/IP works the way it does, as well as enhanced skill at...

    Diskeeper 2008 v12.0.759.0

    your computer is fragmentation of the Master File Table (MFT) on NTFS volumes and your paging files. Since the operating system relies heavily on the MFT and paging file, the effect of ...

    Android Best Practices

    Android Best Practices by Godfrey Nolan shows you how to make your Android apps stand out from the crowd with great reviews. Why settle for just making any Android app? Build a brilliant Android app ...

Global site tag (gtag.js) - Google Analytics