Oracle FAQ Your Portal to the Oracle Knowledge Grid
HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US
 

Home -> Community -> Usenet -> c.d.o.tools -> Re: Retrieving Oracle Table size in Bytes

Re: Retrieving Oracle Table size in Bytes

From: Jonathan Lewis <jonathan_at_jlcomp.demon.co.uk>
Date: Wed, 31 Jan 2001 21:38:18 -0000
Message-ID: <980976985.26232.0.nnrp-09.9e984b29@news.demon.co.uk>

You can generate a piece of SQL which tells you exactly how much space your table uses:

Do you want the space allocated for the table, or the space that would be needed if you wanted to recreate your table with a 0 pctfree, or the space that the actual table takes up excluding block overheads, or excluding block and row overheads, or excluding block, row and column overheads ?

There are a couple of notes on space usage on my website: faq -> space allocation would be a good starting point.

--
Jonathan Lewis
Yet another Oracle-related web site:  http://www.jlcomp.demon.co.uk

Practical Oracle 8i:  Building Efficient Databases

Publishers:  Addison-Wesley
More reviews at: http://www.jlcomp.demon.co.uk/book_rev.html



Joachim Pense wrote in message <959vqp$8l7$04$2_at_news.t-online.com>...
newopt_at_my-deja.com> wrote

> > I looked in dba_tables for an oracle table size in bytes but didn't see
> > a column that reflects the size of the table in bytes.
> >
> > Where can this information be retrieved from?
> >
> > Thanks
> >
Mark Wagoner replied:
> You need to sum all the segment sizes for the table. Use dba_extents for
> the table/segment name. This will give you only the allocated space,
> since an extent is pre-allocated, not necessarily used.
It seems strange (and often annoying) that with Oracle dbs, you cannot really answer the question: "How much space do your data occupy?". Will they do something about it in Oracle 9i? I doubt it. Joachim
Received on Wed Jan 31 2001 - 15:38:18 CST

Original text of this message

HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US