Re: Space questions again
Date: 3 Apr 94 21:03:49 EST
Message-ID: <1994Apr3.210349.1_at_corp02.d51.lilly.com>
In article <CnL3v9.D8r_at_cbnewsj.cb.att.com>, felixc_at_cbnewsj.cb.att.com (felix.cabral) writes:
> I posted this and have not received replies so I'll try again.
>
> I inherited the DBA responsiblity in my group so I'm learning as I go. What
> we have are tables of fixed sizes (no variable chars). The tablespaces are
> stored on raw partitions. Here are a few questions:
>
> A table named LINE resides in tablespace TBSP1. The table size is 366
> bytes. The table LINE has 9598 rows. When I multiply the number of LINE entries
> (9598) by the LINE size (366 bytes) I get 3512868 which should indicate how
> much space is USED in TBSP1. The questions are:
>
> - How can I verify the used space in TBSP1 using a query? I've used
> "select sum(bytes)" but the number I get is way off (8388608).
>
> - How much overhead is used in TBSP1 besides the 366 bytes size of
> each LINE row?
>
>
> Thanks in advanced. Please respond here or via email if you can help.
>
> --
The space calculation algorithm is described starting around page 8-17 of the
ORACLE7 Server Administrator's Guide. There is overhead involved in table
storage.
A couple of questions:
- You say no varchar...you are using CHAR under ORACLE7? CHAR under ORACLE6 is varying length. Are you using number or date fields? Those are varying length.
- You don't say which view you did the 'sum(bytes)' from. If you did it from DBA_TABLESPACES, note that there may be other objects in the tablespace, such as other tables, or indexes. You should look at DBA_SEGMENTS, where the segment name is the table name. Note that this table shows allocated size, not actual used space. So, if you initial extent was 4m, and you only had one row in the table, it would still show 4m.
Hope this helps.
-- Bob Swisshelm | swisshelm_at_Lilly.com | 317 276 5472 Eli Lilly and Company | Lilly Corporate Center | Indianapolis, IN 46285Received on Mon Apr 04 1994 - 04:03:49 CEST
