Re: Identifying deleted rows for a table

From: Jonathan Lewis <>
Date: Mon, 18 Apr 2011 18:28:59 +0100
Message-ID: <>

"dba cjb" <> wrote in message
> Oracle enterprise windows 2003
> I am interested in finding out how much of a table is made up of
> deleted rows
> / just to see if there is a potential benefit for backups /
> operations
> I have run following query
> SELECT blocks as BLOCKS_USED, empty_blocks
> FROM dba_tables
> WHERE table_name='TASK'
> It shows me I have no empty blocks
> Is there a query that shows me deleted rows / non-deleted rows
> within the used blocks for this table
> My aim is to assess wether a table export / import would be beneficial
> for
> 1) rman backups
> 2) database operations
> regards
> Chris B

It depends how much work you want Oracle to do, what sort of precision you want in your answer, and what assumptions you are prepared to make about your data. For example, if you're prepared to assume that every row in a table is about the same size then there's a query on my blog that could be helpful:

Slice and dice it various ways, but if you have an expected number of rows per block this gives you some idea of how many blocks are not filled.


Jonathan Lewis
Received on Mon Apr 18 2011 - 12:28:59 CDT

Original text of this message