Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
![]() |
![]() |
Home -> Community -> Usenet -> c.d.o.tools -> Re: Retrieving Oracle Table size in Bytes
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> wroteReceived on Wed Jan 31 2001 - 15:38:18 CST
> > 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
![]() |
![]() |