Welcome to the dBforums forums.

You are currently viewing our boards as a guest which gives you limited access to view most discussions, articles and access our other FREE features. By joining our free community you will have access to post topics, communicate privately with other members (PM), respond to polls, upload your own photos and access many other special features. Registration is fast, simple and absolutely free so please, join our community today!

If you have any problems with the registration process or your account login, please contact contact support.

If you prefer not to see double-underlined words and corresponding ads, place your cursor
here for ContentLink opt out.

Go Back  dBforums > Database Server Software > Oracle > empty_blocks

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1 (permalink)  
Old 07-06-08, 14:37
tjay83 tjay83 is offline
Registered User
 
Join Date: Feb 2008
Posts: 28
empty_blocks

Hi
Does the emty_blocks column in the below query
show blocks above HWM or empty blocks below HWM


select table_name,a.blocks,b.bytes/1024 as KB,num_rows,empty_blocks
from user_tables a, user_segments b
where a.table_name = b.segment_name
and empty_blocks >0
order by empty_blocks desc

Table_name Blocks KB Num_rows Empty_blocks
------------------- --------- ----- ------------ ------------------
TEMPHISTORY 0 52224 0 6528
Reply With Quote
  #2 (permalink)  
Old 07-06-08, 14:49
anacedent anacedent is offline
Registered User
 
Join Date: Aug 2003
Location: Where the Surf Meets the Turf @Del Mar, CA
Posts: 3,564
>Does the emty_blocks column in the below query show blocks above HWM or empty blocks below HWM

No & you should run your own empirical test for obtaining correct answer.

Create a table.
Insert a bunch of rows.
commit;
delete half the rows.
run your query.
__________________
You can lead some folks to knowledge, but you can not make them think.
The average person thinks he's above average!
Reply With Quote
  #3 (permalink)  
Old 07-06-08, 15:05
tjay83 tjay83 is offline
Registered User
 
Join Date: Feb 2008
Posts: 28
alter table move clause works for blocks which are only below HWM
right?
Reply With Quote
  #4 (permalink)  
Old 07-06-08, 15:09
anacedent anacedent is offline
Registered User
 
Join Date: Aug 2003
Location: Where the Surf Meets the Turf @Del Mar, CA
Posts: 3,564
By definition all data within a table exists below the HWM.
So there is nothing to move above HWM.

Why the obsession with HWM; over which you have minimal or no control?

What SQL is used to obtain HWM for any table?
__________________
You can lead some folks to knowledge, but you can not make them think.
The average person thinks he's above average!
Reply With Quote
  #5 (permalink)  
Old 07-06-08, 15:36
tjay83 tjay83 is offline
Registered User
 
Join Date: Feb 2008
Posts: 28
but
shrink space command, reclaim space both below and above HWM
Reply With Quote
  #6 (permalink)  
Old 07-06-08, 16:18
anacedent anacedent is offline
Registered User
 
Join Date: Aug 2003
Location: Where the Surf Meets the Turf @Del Mar, CA
Posts: 3,564
Why the obsession with HWM; over which you have minimal or no control?

What SQL is used to obtain HWM for any table?

To what do you use HWM?
How does HWM relate to any Business Rule?
__________________
You can lead some folks to knowledge, but you can not make them think.
The average person thinks he's above average!
Reply With Quote
Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On