Avatar of hraja77
hraja77
 asked on

find exact space taken by a table in oracle

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
Oracle Database

Avatar of undefined
Last Comment
hraja77

8/22/2022 - Mon
ASKER CERTIFIED SOLUTION
slightwv (䄆 Netminder)

THIS SOLUTION ONLY AVAILABLE TO MEMBERS.
View this solution by signing up for a free trial.
Members can start a 7-Day free trial and enjoy unlimited access to the platform.
See Pricing Options
Start Free Trial
GET A PERSONALIZED SOLUTION
Ask your own question & get feedback from real experts
Find out why thousands trust the EE community with their toughest problems.
SOLUTION
mrjoltcola

THIS SOLUTION ONLY AVAILABLE TO MEMBERS.
View this solution by signing up for a free trial.
Members can start a 7-Day free trial and enjoy unlimited access to the platform.
See Pricing Options
Start Free Trial
GET A PERSONALIZED SOLUTION
Ask your own question & get feedback from real experts
Find out why thousands trust the EE community with their toughest problems.
hraja77

ASKER
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
hraja77

ASKER
by the way slightw i appreciate and understand you point about allocated and used space but this is not an issue for us - thanks
slightwv (䄆 Netminder)

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...
Your help has saved me hundreds of hours of internet surfing.
fblack61
hraja77

ASKER
ok thanks for that