Home » SQL & PL/SQL » SQL & PL/SQL » Tablespaces memory structure (Oracle,10g,Linux)
Tablespaces memory structure [message #318674] Wed, 07 May 2008 09:30 Go to next message
sundarfaq
Messages: 235
Registered: October 2007
Location: Chennai
Senior Member
Hi,

I have loaded 57k record into one table.but i have verfied the memory between OS and database memory.It shows some difference between them

select sum(bytes)
from user_segments
where tablespace_name-'TEST';

It shows a 70kb.In DB 13 KB(70-57) memory wasted.

Test tablespace has contains only one tables.before loading data
test tablespace has occupies 0% data.

What is the reason for it?

Thanks
Michael
Re: Tablespaces memory structure [message #318678 is a reply to message #318674] Wed, 07 May 2008 09:56 Go to previous messageGo to next message
Michel Cadot
Messages: 64139
Registered: March 2007
Location: Nanterre, France, http://...
Senior Member
Account Moderator
Segment header
Block headers
Rows headers
Column headers
Free space

Regards
Michel
Re: Tablespaces memory structure [message #318680 is a reply to message #318674] Wed, 07 May 2008 09:59 Go to previous messageGo to next message
JRowbottom
Messages: 5933
Registered: June 2006
Location: Sunny North Yorkshire, ho...
Senior Member
Oracle doesn't allocate space to tables on a byte by byte basis.

Space is allocated in Extents.
If your tablespace is Dictionary Managed (obsolete now, but still supported) then each tablespace will have a default Initial and Next extent size. These sizes can be overridden by the extent sizes specified for when the table is created.

These Extents are the units in which space is allocated to the tables.

Additionally, each table has a parameter called PCTFREE, which specifies the amount of free space to be left in each block to allow future updates to increase the size or rows without chaining the row across multiple blocks.

Between these two factors, the only thing you can guarantee is that the total space allocated to a table will be strictly greater than the size of the data the table contains.

[Good point Michel - I forgot about the various headers]

[Updated on: Wed, 07 May 2008 09:59]

Report message to a moderator

Re: Tablespaces memory structure [message #318720 is a reply to message #318674] Wed, 07 May 2008 13:45 Go to previous message
joy_division
Messages: 4643
Registered: February 2005
Location: East Coast USA
Senior Member
holdingbe wrote on Wed, 07 May 2008 10:30
H
select sum(bytes)
from user_segments
where tablespace_name-'TEST';



Why don't you ever post your actual session in any message you post here? This is invalid syntax. Is it so hard to cut and paste? Control-C and Control-V and on every keyboard. Having to retype is making double work and ripe for errors such as the one you posted.
Previous Topic: camn we use 2 instances of set linesize
Next Topic: installer fail when install oracle client 11g
Goto Forum:
  


Current Time: Thu Dec 08 10:27:56 CST 2016

Total time taken to generate the page: 0.10897 seconds