I recently worked on a project where I have an interval-partitioned table that I insert into daily. After the insert, I wanted to gather statistics on the partition that I’d just inserted to. I thought back through some recent reading and remembered that the ROWID of an object contains the following elements:
- Letters 1-6 = the OBJECT_ID
- Letters 7-9 = the relative FILE_ID
- Letters 10-15 = the BLOCK within the file
- Letters 16-18 = the ROW within the block
I knew there was a package called DBMS_ROWID (although I had never used it) but I guessed there would be a procedure that I might could acquire an OBJECT_ID for a given ROWID.
And I was right.