How do I calculate disk usage for a table

Is there a formula or equation that I can use to calculate disk usage (in MB) for a table?
I would like to foind out what's the best option for initial storage space and monthly growth.

Hi,
We will discuss this by taking a simple example:
SQL>Create table T_REGISTRATION (Name varchar2 (100),
Fathers_Name varchar2 (100),
Age number(5),
Sex char (1),
Data_of_Birth Date)
storage (initial 40k next 40k minextents 5)
Tablespace TBS1;
Table created.
SQL> insert into T_REGISTRATION values ('Name_1','Name_1_Father',40,'M','24-FEB-66');
1 row created.
SQL> Commit;
Commit complete
SQL> analyze table T_REGISTRATION compute statistics;
Table analyzed.
SQL> compute sum of blocks on report
SQL> break on report
SQL> select extent_id, bytes, blocks
from user_extents
where segment_name = 'T_REGISTRATION'
and segment_type = 'TABLE';
EXTENT_ID BYTES BLOCKS
0 65536 8
1 65536 8
2 65536 8
3 65536 8
Sum 32
SQL> clear breaks
SQL> select blocks, empty_blocks,
avg_space, num_freelist_blocks
from user_tables
where table_name = 'T_REGISTRATION';
BLOCKS EMPTY_BLOCKS AVG_SPACE NUM_FREELIST_BLOCKS
5 27 8064 0
From above:-
1.     We have 32(Sum) blocks allocated to the table
2.     27 blocks are totally empty
3.     5 blocks contains data(BLOCKS+EMPTY_BLOCKS = SUM i.e 5+27=32)
4.     We have an average of about 8064 bytes = 7.8 free on each block used (8064/1024=7.8K From above AVG_SPACE value).
Therefore our table
1.     Consumes 5 blocks
2.     In this 5blocks * 8k blocksize - 5 blocks * 7.8K free = 1k is used for inserted data.
Source for this example :- asktom.oracle.com
Thanks,
Sankar

Similar Messages

  • How do I access Disk Utility for 10.7.1?

    How do I access Disk Utility for 10.7.1? I found it in the forums a few weeks ago, used it, then lost the directions. This is a last ditch attempt
    to use OS Lion. I parted my hair incorrectly when I installed and have been plagued by the dread rainbow spinning ball in EVERY application. Yes, every. Name one, Safari, Firefox, Text Edit, Mail, Excel, Word, iTunes, Garage Band, Calculator, Calender, iPhoto....yes, every, and I cannot
    find a solution that works. I have back up files on two different hard drives 500 gig and 1 terrabyte with all my music, photo and writing files.
    I am a writer and a musician so imagine the frustration. OS 10.6 is an option of course. My dedication to Apple and each new OS is deep so
    I am hoping that somehow there will a fix, an upgrade, something that does not require me to go bac to the much more endangered species named OS.
    hahhaa! Just stalled waiting for the ball to finish with it's random spinning.... SO, this is like a last desperate .... it just did two more stalls.
    NO OTHER apps running, just little Firefox holding on for dear life, last desperate request for a fix.
    MacKeeper has been great in sending helpful directions for getting the Antivirus to work after it mysteriously decided to stop working, Quite MacKeeper,  go to Activity Monitor, force quit helper, start up MacKeeper and run program. It works!
    SO before my third stall stops me, please post directions to open disk utility in administration mode so that I can do any further repairs that have not worked by using it from the open system. Also keychain synching stopped working with Lion.
    Thanks to any and all who can help.

    Press and hold Command-R keys and reboot. You'll then start up in the Lion Recovery HD. You'll find Disk Utility there.
    Command-R to the rescue.
    Just hold down Command-R during startup and Lion Recovery springs into action. It lets you choose from common utilities: You can run Disk Utility to check or repair your hard drive, erase your hard drive and reinstall a fresh copy of Lion, or restore your Mac from a Time Machine backup. You can even use Safari to get help from Apple Support online. And if Lion Recovery encounters problems, it will automatically connect to Apple over the Internet.

  • How many SECONDARY INDEXES are created for CLUSTER TABLES?

    how many SECONDARY INDEXES are created for CLUSTER TABLES?
    please explain.

    There seems to be some kind of misunderstanding here. You cannot create a secondary index on a cluster table. A cluster table does not exist as a separate physical table in the database; it is part of a "physical cluster". In the case of BSEG for instance, the physical cluster is RFBLG. The only fields of the cluster table that also exist as fields of the physical cluster are the leading fields of the primary key. Taking again BSEG as the example, the primary key includes the fields MANDT, BUKRS, BELNR, GJAHR, BUZEI. If you look at the structure of the RFBLG table, you will see that it has primary key fields MANDT, BUKRS, BELNR, GJAHR, PAGENO. The first four fields are those that all cluster tables inside BSEG have in common. The fifth field, PAGENO, is a "technical" field giving the sequence number of the current record in the series of cluster records sharing the same primary key.
    All the "functional" fields of the cluster table (for BSEG this is field BUZEI and everything beyond that) exist only inside a raw binary object. The database does not know about these fields, it only sees the raw object (the field VARDATA of the physical cluster). Since the field does not exist in the database, it is impossible to create a secondary index on it. If you try to create a secondary index on a cluster table in transaction SE11, you will therefore rightly get the error "Index maintenance only possible for transparent tables".
    Theoretically you could get around this by converting the cluster table to a transparent table. You can do this in the SAP dictionary. However, in practice this is almost never a good solution. The table becomes much larger (clusters are compressed) and you lose the advantage that related records are stored close to each other (the main reason for having cluster tables in the first place). Apart from the performance and disk space hit, converting a big cluster table like BSEG to transparent would take extremely long.
    In cases where "indexing" of fields of a cluster table is worthwhile, SAP has constructed "indexing tables" around the cluster. For example, around BSEG there are transparent tables like BSIS, BSAS, etc. Other clusters normally do not have this, but that simply means there is no reason for having it. I have worked with the SAP dictionary for over 12 years and I have never met a single case where it was necessary to convert a cluster to transparent.
    If you try to select on specific values of a non-transparent field in a cluster without also specifying selections for the primary key, then the database will have to do a serial read of the whole physical cluster (and the ABAP DB interface will have to decompress every single record to extract the fields). The performance of that is monstrous -- maybe that was the reason of your question. However, the solution then is (in the case of BSEG) to query via one of the index tables (where you are free to create secondary indexes since those tables are transparent).

  • How to find out the link for the tables for sub contract PO

    Dear All,
    How to find out the link for the tables for sub contract PO, I am looking for the fields Material, Unit, Batch no., quantity.
    Please provide the solution for the Table related to ABAP.
    Thanks,
    V.V.

    Hi,
       Make use of the table EKKO, EKPO...
    For subcontract please select the option in EKPO-PSTYP.
    Regards
    GK.

  • How to get count of rows for a table?

    Hi,
    How to get count of rows for a table and secondly, how can i have access to a particular cell in a table?
    Regards,
    Devashish

    Hi Devashish,
    WdContext.node<Your_node_name>().size() will give you the no: of rows.
    This should be the node that is bound to the table's datasource property.
    WdContext.node<Your_node_name>().get<node_name>ElementAt(index_value); will select the row at that particular index.
    You can access an attribute of a particular row as
    WdContext.node<Your_node_name>().get<node_name>ElementAt(index_value).get<attribute_name>();
    Hope this helps,
    Best Regards,
    Nibu.
    Message was edited by: Nibu Wilson

  • How to check the Statistics generated for a table through DBMS_STATS.

    Hi,
    How to check the statistics generated for a Table through DBMS_STATS.GATHER_TABLE_STATS procedure ?
    Please let me know.
    Thanks !
    Regards,
    Rajasekhar

    Rajasekhar wrote:
    Hi,
    How to check the statistics generated for a Table through DBMS_STATS.GATHER_TABLE_STATS procedure ?
    Please let me know.
    Thanks !
    Regards,
    Rajasekharquery ALL_TABLES

  • How to find out the script for the table using SQL

    Hi,
    Could any one tell me that how to find out the script for the table using SQL.
    Thanks,
    kamal

    Kamal,
    You can find the SQL query in Advanced tab of Answers
    Thanks,
    Balaa...

  • REgd  How to find appropriate data sourses for given tables in Inve Mngt

    Experts!
    M completely new to Inventory Mngt where i needto extract data from R/3,
    they 've given me some tables, but i dont know how to find appropriate data
    sourses for that tables
    those are
    MKPF,MSEG
    EKKO,EKPO
    EKBE,EKET
    How to find right data sourses when table names given in any module??
    pls guide me,
    'll assign the points.
    thanks
    Srujan

    Hi,
    2LIS_03_BX is the initialization of your stocks; you'll need to perform the setup procedure for extracting this data.
    Usually this DSource is used to bring the stocks positions at a given time; from this given time you'll then extract deltas from BF and UM so your stocks are always:
    BX + BF(Delta) + UM(delta).
    Hope this clears your doubts...
    Olivier.

  • How can I calculate disk space/DB space and storage spaces.

    Hi all,
    How can I calculate space clauses and memory related parameters for tables and table spaces? Updation is not allowed in these tables.
    I have to create a database also.
    I expect a reply with examples.
    [email protected]
    [email protected]
    Thanks for all replies .

    Boby,
    The formula to estimate the storage parameters for tables and indexes are the following:
    Table size = db block size * (# of Estimated rows in 12 months * average row length)/(db block size-90) *(1-PCTFREE/100)
    Let assume that you want to create a table called Jose_tab,
    db block size = 4092
    Estimated row length in 12 months = 1000
    Average row len = 100
    PCTFREE(Updation is not allowed) = 0
    Then, your INITIAL storage parameter will be estimated as follows:
    4092*1000*100
    (4092-90)*(1-0/100)
    = About 10M
    Your create table command will look like this,
    CREATE TABLE jose_tab
    (col1 VARCHAR2(10), col2 NUMBER(2),
    ....coln VARCHAR2(100))
    STORAGE(INITIAL 10M NEXT 10M
    PCTINCREASE 0)
    PCTFREE 0 PCTUSED 80
    TABLESPACE tablespace_name;
    Storage parameters for tablespace depends on the amount of disk space available. You can ignore tablespace storage parameters since the size of the tablespace is determined by the size(s) of the data files. Refer to the DBA manual for details.
    John

  • How can i calculate execution time for methods?

    I'm making a project that i want to calculate execution time for a
    method in "miliseconds" or "microseconds".You see,I have a sort algorithm and i want to calculate execution time of this algorithm.How can i do?
    Thanks...

    Just remembered.
    The answer you get isn't trustworthy below a hundred millis, so you may need to sort a hundred or a thousand times to get a reasonable elapsed time. You also need to run the test five or ten times and take an average. In Windows you should fire up the Task Manager and be sure that your other CPU usage is as near to zero as you can get.

  • How do we calculate Accumulated Depreciation for a Particular Period

    Dear Members,
    How do we calculate the Accumulated Depreciation for a particular asset. It would be great if some body can explain me ,what tables should we use.
    I read that Accumulated Depreciation is nothing but deprn_reserve column in fa_deprn_summary table. I have to make a report which should show the accumulated depreciation for an asset by period name. (eg : For MAY-07 the report should give the accumulated depreciation for that asset).
    Please give your suggestions.
    Thanks
    sandeep

    Hi,
    You can use DEPRN_RESERVE from fa_deprn_summary to get accumulated deprn. Make sure you select the latest row from fa_deprn_summary for a particular period.
    Use FA_DEPRN_PERIODS to join with period_counter if you wnat to use Period Name as criteria.
    Cheers
    Sunil Chawla

  • How to specify maximum memory usage for Java VM in Tomcat?

    Does any one know how to setup memory usage for Java VM, such as "-Xmx256m" parameter, in Tomcat?
    I'm using Tomcat 3.x in Apache web server on Sun Solaris platform. I already tried to add the following line into tomcat.properties, like:
    wrapper.bin.parameters=-Xmx512m
    However, it seems to me that this doesn't work. So, how about if my servlet will consume a large amount of memory that exceeds the default 64M memory boundary of Java VM?
    Any idea will be appreciated.
    Haohua

    With some help we found the fix. You have to set the -Xms and -Xmx at installation time when you install Tomcat 4.x as a service. Services do not read system variables. Go to the command prompt in windows, and in the directory where tomcat.exe resides, type "tomcat.exe /?". You will see jvm_options as part of the installation. Put the -Xms and -Xmx variables in the proper place during the install and it will work.
    If you can't uninstall and reinstall, you can apply this registry hack that dfortae sent to me on another thread.
    =-=-=-=-=-=
    You can change the parameters in the Windows registry. If your service name is "Apache Tomcat" The location is:
    HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\Apache Tomcat\Parameters
    Change the JVM Option Count value to the new value with the number of parameters it will now have. In my case, I added two parameters -Xms100m and -Xmx256m and it was 3 before so I bumped it to 5.
    Then I created two more String values. I called the first one I added 'JVM Option Number 4' and the second 'JVM Option Number 5'. Then I set the value inside each. The first one I set to '-Xms100m' and the second I set to '-Xmx256m'. Then I restarted Tomcat and observed when I did big processing the memory limit was now 256 MB, so it worked. Hope this helps!
    =-=-=-=-=
    I tried this and it worked. I did not want to have to go through the whole reinstallation process, so this was best for me.
    Thanks to all who helped on this.

  • How to get available disk space for a disk in the system ?

    hi all,
    I need to figure out the available disk space for a particular disk before I can write my file to a directory in the disk. I do this to avoid unsufficient disk space problem in my program. May I know how can I do this in Java ? I look at the API function for java.io.File class but there isn't any function to check disk space. I would appreciate any help from fellow Java developers. Thanks a million.
    regards,
    tuck meng

    You cannot do this in purely platform independent way.
    You can use System.exec to run native OS utilities like df and parse the output, but then you have to knwo which platform your program is running on, or build in some automatic detection of OS and have corresponding native calls for each likely one.
    BTW. even if you get a number of free bytes on disk that's larger than the size of the file you want to write this is no guarantee that there will be enough diskspace for your file, because another process might write to the disk in the meantime. So you will have to do proper error handling and recover gracefully from the disk full sitution no matter what.

  • MDW Disk Usage for Database Report Error - A data source has not been supplied for the data source DS_TraceEvents

    Hello,
    On the MDW Disk Usage Collection Set report, I get the following error when I click on a database hyperlink.
    A data source has not been supplied for the data source DS_TraceEvents
    SQL profiler shows the following SQL statements are executed (I've replaced the database name with databaseX)
    1. exec sp_executesql N'SELECT
    dtb.name AS [Name]
    FROM
    master.sys.databases AS dtb
    WHERE
    (dtb.name=@_msparam_0)',N'@_msparam_0 nvarchar(4000)',@_msparam_0=N'databaseX'
    this returns zero rows as databaseX does not exist on my MDW central server, but is a database on a target server (i.e. one that is being monitored and uploaded into the MDW central server).
    2. USE [datatbaseX]
    this produces the following error:
    Msg 911, Level 16, State 1, Line 1
    Database 'databaseX' does not exist. Make sure that the name is entered correctly.
    why is the report looking for the database on my server?
    thanks
    Jag
    Environment: MDW (Management Data Warehouse) on SQL 2008 R2

    Hi Jag,
    Based on my test, while this database is offline, we will encounter this issue. This is because that while we click the certain database in “Disk Usage Collection
    Set” report, it will query some information with that certain database. If this database is offline, we will not access this database to acquire related information and generates this error.
    Therefore I recommend that you check the status of this database by using this system view:
    sys.databases. If it is not online, please execute
    the following statements in a new window to make this database to be online:
    USE master
    GO
    ALTER DATABASE <database name> SET ONLINE
    GO
    If anything is unclear, please let me know.
    Regards,
    Tom Li

  • VSOM Not Showing Disk Usage for Media Servers

    I wanted to try and figure out why my Operations Manager is not synchronizing the disk usage of the media servers storage partition. Currently I am running a fully virtualized environment on a Cisco UCS-B series chassis with version VSM 7.5.1 (Redhat 6.4) on my Operations Manager and all of the media servers.
    As shown in the image below I am providing an example of the disk usage that shows for one of my media servers in the Operations Manager
    Below is the an image of the disk usage shown through CLI of the same server.
    As you can see there is a major discrepancy between the 37MB Used(Operations Manager) and the 4.8TB Used(CLI).
    Has anyone ran into a similar issue and found a resolution, or know of the scripts on the Operations Manager or the media servers that are responsible for the sychronization of this information.
    Thanks,
    Michael

    Interesting.  Thanks for following up and letting us know a punt self-righted it.  Have you checked to see if it only updated the once, or is it keeping accurate track now as storage get used?

Maybe you are looking for

  • ITunes movie purchase - not showing in cloud library on iphone

    Hello Yesterday I redeemed a 25 dollar USD ITunes gift card. I used it to purchase two movies. The second movie I purchased (Brick) ended up using a cross between iTunes credit and my credit card. Anyway, I can see it in my purchase history on my iPh

  • Firefox Causes "BLUE SCREEN CRASH"

    Hello There. To my utter dismay I am forced to use Chrome to access this forum. The reason is the moment I use Firefox (3) my computer crashes and I get the dreaded windows blue screen. I have been using ff for a long time now without problems. Yeste

  • IMac G5 20" monitor looks flakey

    I have an iMac 20" G5 (not isight) and the monitor has suddenly gotten lines the entire length of it. Is anyone familiar with the cause? Link to a screenshot is below. http://www.2047.org/g5.gif

  • Changing host name of JDI server

    Hi, during installation of JDI I used ip-addresses as host names for defining the domain host, the SLD server in domain definition, the dtr server URL in track definition, the CBS server URL in track definition. I know that one shouldn´t use ip-addre

  • How to purge audit tables in 11.2.01

    Hi there, Navigation within OWB both Deisgn Center, Control Center and repository browser is far slower than other development tools on my PC. Is there a way to purge the OWB audit data such that at least deploying mappings, checking repositiory brow