-
The following query is used to find the number of blocks that contain rows:
SELECT COUNT(DISTINCTSUBST(ROWID,15,4)||SUBSTR(ROWID,1,8))
FROM owner.tablename.
I have run this and do not understand how the two substring arguments detect occupancy.
Can somebody help me to understand this?
Thanks in advance.
John Doyle
-
Below is the ROWID format fro Oracle7
'BBBBBBBB.RRRR.FFFF'
where
BBBBBBBB is the block number,
RRRR is the slot(row) number, and
FFFF is a file number.
So in yur query you are counting the no. of occupied blocks in all the files.
However the ROWID format has been changed in Oracle8
Sanjay
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|