Results 1 to 3 of 3
  1. #1
    Join Date
    Jan 2004
    Posts
    153

    Unanswered: Data blocks contains data under High Water Mark

    Hi All,

    Is there any way to find out how many data blocks are currently containing data under HWM ?

    Regards,
    JD

  2. #2
    Join Date
    Aug 2003
    Location
    Where the Surf Meets the Turf @Del Mar, CA
    Posts
    7,776
    Provided Answers: 1
    >Is there any way to find out how many data blocks are currently containing data under HWM ?
    post SQL that return relative block number of High Water Mark.
    You can lead some folks to knowledge, but you can not make them think.
    The average person thinks he's above average!
    For most folks, they don't know, what they don't know.
    Good judgement comes from experience. Experience comes from bad judgement.

  3. #3
    Join Date
    Jul 2003
    Posts
    2,296
    this is a very handy script.
    I believe I got it from Tom Kyte.
    I call it "find high water mark".
    PHP Code:
    set verify off
    column file_name format a50 word_wrapped
    column smallest format 999
    ,990 heading "Smallest|Size|Poss."
    column currsize format 999,990 heading "Current|Size"
    column savings  format 999,990 heading "Poss.|Savings"
    break on report
    compute sum of savings on report
    compute sum of currsize on report
    compute sum of smallest on report

    column value new_val blksize
    select value from v$parameter where name 
    'db_block_size'
    /

    select file_name,
           
    ceil( (nvl(hwm,1)*&&blksize)/1024/1024 smallest,
           
    ceilblocks*&&blksize/1024/1024currsize,
           
    ceilblocks*&&blksize/1024/1024) -
           
    ceil( (nvl(hwm,1)*&&blksize)/1024/1024 savings
    from dba_data_files a
    ,
         ( 
    select file_idmax(block_id+blocks-1hwm
             from dba_extents
            group by file_id 
    b
    where a
    .file_id b.file_id(+)

    - The_Duck
    you can lead someone to something but they will never learn anything ...

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •