We help IT Professionals succeed at work.

find exact space taken by a table in oracle

hraja77
hraja77 asked
on
532 Views
Last Modified: 2012-05-11
Hi,

I need to know the exact space taken by a table in a Oracle database on windows;
Just the table data and not the indexes;
Is there a query that can do this or better ?

thanks
H
Comment
Watch Question

CERTIFIED EXPERT
Most Valuable Expert 2012
Distinguished Expert 2019
Commented:
This one is on us!
(Get your first solution completely free - no credit card required)
UNLOCK SOLUTION
Top Expert 2009
Commented:
This one is on us!
(Get your first solution completely free - no credit card required)
UNLOCK SOLUTION

Author

Commented:
thanks for that slightvw - what it really is is that we tested db2, oracle and sql server for a particular table which is rather large and has a lot of nullable columns with null values. We found that db2 and sql server used around 10GB to store the table whereas Oracle only used 1.2GB for tha same table. The only thing we could put this down to was that the table had a huge amount of nulls values. We cannot change the table as its an out of the box application table owned by a third party - could nulls really cause that much space difference ??
thanks
H

Author

Commented:
by the way slightw i appreciate and understand you point about allocated and used space but this is not an issue for us - thanks
CERTIFIED EXPERT
Most Valuable Expert 2012
Distinguished Expert 2019

Commented:
The bytes column provided by mrjoltcola is probably your best bet then.

I can only speak to Oracle and not at a very granular level on how Oracle does what it does internally.

Oracle treats a null as a true 'unknown'.  It takes no space.  You should only have an EOF character as a place holder but how Oracle actually 'stores' or handles it is over my head.

There are a LOT of discussion out there on the internals and what is actually happening 'under the sheets' but take it all with a grain of salt.

Do you think Oracle will tell SQL Server how it does what it does or visa versa?

Check out:

http://forums.oracle.com/forums/thread.jspa?threadID=853964


If you can provide a little more information on the real reason you are asking these questions we can probably provide more information.

I agree with mrjoltcola from your previous question, you don't pick a RDBMS because of how it handles data storage.  In the grand scheme of things, disk space is cheap.

If you are counting every byte, you might need to rethink the project.  For example, Google doesn't use any of your reference databases...

Author

Commented:
ok thanks for that
Unlock the solution to this question.
Join our community and discover your potential

Experts Exchange is the only place where you can interact directly with leading experts in the technology field. Become a member today and access the collective knowledge of thousands of technology experts.

*This site is protected by reCAPTCHA and the Google Privacy Policy and Terms of Service apply.

OR

Please enter a first name

Please enter a last name

8+ characters (letters, numbers, and a symbol)

By clicking, you agree to the Terms of Use and Privacy Policy.