tblspace number and rowid
Posted in 1997
Hi Y'all,
Tim Jones's posted question on "Selecting Locked rows" got me thinking,
a grave offense! The hamsters are threatening job actions! ;)
The setup:
Pre-Fragmentation, we were always able to select the rowid of a row in
any table and locate where on disk that is.
eg: select hex(rowid) hrid, customer_num from customer
By looking at the rowid, I could see the logical page number relative to
the table. Using that number, and info in oncheck -pt, I could find the
page containing each customer row. I have used this kind of information
in the past to pinpoint corruption in data and index pages.
With the new meaning of rowid in fragmented tables - the simple integer
unique key - selecting rowid gives no such help. In order to locate the
row physically, I would need to know the tbspace number as well as the
rowid. Getting the partition number is difficult for fragment - by -
expression; it borders on impossible for round-robin fragmentation! And
then I'd still have only part of what I'm looking for!
The question:
1. Is there any expression I can use in the SELECT statement to obtain:
a. The tblspace number (partition ID) of the partition containing the
fetched row?
b. The true rowid - logical page number, slot number - of the fetched
row?
If this is to be possible, I suspect it would involve the ability to
read that "rowid" index directly. So, the next question is:
2. Is there any way to read that index and allow me to get at the
partition and rowid information?
Thanks for any satisfactory answers
--
-- Jake (Not in the mood for simple question today)
. .
_..-'( )`-.._
./'. '||\\\\. }\\_/{ .//||` .`\\.
./'.|'.'||||\\\\|.. )o o( ..|//||||`.`|.`\\.
./'..|'.|| |||||\\`````` \\,@,/ ''''''/||||| ||.`|..`\\.
./'.||'.|||| ||||||||||||. ||| .|||||||||||| ||||.`||.`\\.
/'|||'.|||||| ||||||||||||{ | }|||||||||||| ||||||.`|||`\\
'.|||'.||||||| ||||||||||||{ | }|||||||||||| |||||||.`|||.`
'.||| ||||||||| |/' ``\\||`` | ''||/'' `\\| ||||||||| |||.`
|/' \\./' `\\./ \\!|\\ /|!/ \\./' `\\./ `\\|
V V V }' `\\ /' `{ V V V
\\ \\ \\ V / / /
+-----------------------------------------------------------+
| Impeccable Logic: A thought process which successfully |
| resists chicken bites |
+-----------------------------------------------------------+