954,561 Members — Technology Publication meets Social Media
Username:
Password:
Lost login information?
Have something to say? Contribute New Article Reply to this Article

High Water Mark.

could you please tell me what is high water mark in oracle terminology? Please explain with example.

shahnazurs
Newbie Poster
17 posts since Mar 2006
Reputation Points: 10
Solved Threads: 0
 

Hi

You have to understand Oracle storage.

Each table is made up of extents and each extent is made up of oracle blocks - a common block size is 8k. So you have a table with 10 extents (80K).

You populate your table with 2 million rows of data and you will have many hundreds of extents. Now lets assume that you delete over half of the records in the table. Oracle still has the same number of extents but many of the blocks are empty. When you run a query against the table Oracle will scan through all the blocks including empty ones looking for data. So you can think of the total number of extents / blocks used as the high water mark.

To fix you export the table, drop it and import it back in.

Alistair

alit2002
Junior Poster in Training
52 posts since Dec 2006
Reputation Points: 10
Solved Threads: 3
 

after deleting rows high water mark remain same, what will happen if i insert new rows now.where this new rows will be stored? above the HWM or below?

sumon2b
Newbie Poster
1 post since Jun 2011
Reputation Points: 10
Solved Threads: 0
 

Yes, after deleting rows the high water mark is the same. New rows will use the space left by those that were deleted unless they don't fit into that space then new space is allocated and the high water mark increases. To reduce the highwater mark export / datapump the table, drop it and import it back in again.

alit2002
Junior Poster in Training
52 posts since Dec 2006
Reputation Points: 10
Solved Threads: 3
 

If you have to remove the whole data,then in that case Truncate command will be better then Delete because it will release the memory and the High water mark will be resetted to the original value.Hence later on, fetching on that table will be faster.

Koolhemu
Newbie Poster
1 post since Aug 2011
Reputation Points: 10
Solved Threads: 0
 

This article has been dead for over three months

Post: Markdown Syntax: Formatting Help
You