table size [message #527868] |
Thu, 20 October 2011 09:12 |
|
hanner
Messages: 90 Registered: August 2011 Location: at HOME
|
Member |
|
|
ops$tkyte@DEV8I.WORLD> select blocks, empty_blocks,
2 avg_space, num_freelist_blocks
3 from user_tables
4 where table_name = 'T'
5 /
BLOCKS EMPTY_BLOCKS AVG_SPACE NUM_FREELIST_BLOCKS
---------- ------------ ---------- -------------------
19 35 2810 3
Ok, the above shows us:
- we have 55 blocks allocated to the table (still)
- 35 blocks are totally empty (above the HWM)
- 19 blocks contains data (the other block is used by the system)
- we have an average of about 2.8k free on each block used.
Therefore, our table
- consumes 19 blocks of storage in total.
- of which 19 blocks * 8k blocksize - 19 block * 2.8k free = 98k is used for our data.
not too sure this calculation is accurate for getting the size (data)of the table.
|
|
|
|
|
|
|
Re: table size [message #527946 is a reply to message #527940] |
Thu, 20 October 2011 23:18 |
|
Michel Cadot
Messages: 68716 Registered: March 2007 Location: Saint-Maur, France, https...
|
Senior Member Account Moderator |
|
|
If you want size of the data then user AVG_ROW_LEN*NUM_ROWS, assuming the statistics are up to date (which is also assume in your query).
Regards
Michel
[Updated on: Fri, 21 October 2011 05:28] Report message to a moderator
|
|
|
|
Re: table size [message #527960 is a reply to message #527956] |
Fri, 21 October 2011 01:24 |
|
Michel Cadot
Messages: 68716 Registered: March 2007 Location: Saint-Maur, France, https...
|
Senior Member Account Moderator |
|
|
I mean this but NOT using alter table, using dbms_stats.
And yes this will give you the actual size of your data as they are stored. Now I don't know what you can do with this information.
Regards
Michel
[Edit: missing word]
[Updated on: Fri, 21 October 2011 05:28] Report message to a moderator
|
|
|
|
|
|
|
|
|
|
|
|
|
Re: table size [message #528159 is a reply to message #528158] |
Sat, 22 October 2011 05:38 |
John Watson
Messages: 8960 Registered: January 2010 Location: Global Village
|
Senior Member |
|
|
I wrote the OCA Oracle Press Book. Many readers have told me that the relationship between logical and physical storage is explained perfectly. What did you not understand?
|
|
|
|
|
Re: table size [message #528847 is a reply to message #528812] |
Thu, 27 October 2011 07:58 |
|
hanner
Messages: 90 Registered: August 2011 Location: at HOME
|
Member |
|
|
John Watson wrote on Thu, 27 October 2011 18:09Do you have the full book, or a stolen copy of it on CD?
oei, i did not stole it. I borrow it from the library! I did not got hold of the book. The cd is available only.
[Updated on: Thu, 27 October 2011 07:58] Report message to a moderator
|
|
|
Re: table size [message #528853 is a reply to message #528847] |
Thu, 27 October 2011 08:11 |
John Watson
Messages: 8960 Registered: January 2010 Location: Global Village
|
Senior Member |
|
|
If you have only the CD, I don't see how it can be a legal. I am not going to give any assistance to people who steal from me. Goodbye.
|
|
|
|
|
|
|
|
|
|
Re: table size [message #528895 is a reply to message #528883] |
Thu, 27 October 2011 10:27 |
|
Michel Cadot
Messages: 68716 Registered: March 2007 Location: Saint-Maur, France, https...
|
Senior Member Account Moderator |
|
|
OK you borrowed it, but the CD should not be gotten WITHOUT the book, purchase or borrowing.
Has your library the book? If not, then it is a steal.
Did your library made several copies of the CD (more than it has the book)? If yes, then it is a steal.
Regards
Michel
[Edit: Add a missing "not"]
[Updated on: Thu, 27 October 2011 11:16] Report message to a moderator
|
|
|
Re: table size [message #528901 is a reply to message #528895] |
Thu, 27 October 2011 11:05 |
cookiemonster
Messages: 13959 Registered: September 2008 Location: Rainy Manchester
|
Senior Member |
|
|
Michel Cadot wrote on Thu, 27 October 2011 16:27but the CD should be gotten WITHOUT the book, purchase or borrowing.
should not be gotten?
|
|
|
|