Database Administration (MOSC)

MOSC Banner

Is there a more performant way to detect hight water mark of some datafile than query dba_extents?

Using the following query to detect the high water mark for a given datafile takes often a long time when the datafile is big. Is there a better approach to get the upper border of usage inside some datafile? Release is Oracle 19c

SELECT MAX(e.block_id + e.blocks - 1) AS last_used_block
FROM dba_extents e
WHERE e.file_id = :dbfid;

Howdy, Stranger!

Log In

To view full details, sign in to My Oracle Support Community.

Register

Don't have a My Oracle Support Community account? Click here to get started.

Category Leaderboard

Top contributors this month

New to My Oracle Support Community? Visit our Welcome Center

MOSC Help Center