Home  Easy-Code   Forum    Updater 

Not signed in (Sign In)
    • CommentAuthorPaddy
    • CommentTimeMay 26th 2010

    To find number of rows present in a oracle data block for a particular table , you can use the below script

    select blocknum,cnt from
    (select dbms_rowid.ROWID_BLOCK_NUMBER( rowid ) blocknum, count(*) cnt from emp
    group by dbms_rowid.ROWID_BLOCK_NUMBER( rowid ));

    To get approx number of rows per block in a index:

    select (select count(*) from emp)/blocks from dba_segments where segment_name ='idx_emp_id';