Home » RDBMS Server » Performance Tuning » Raw Chaining and Row Migration.Scenario :
Raw Chaining and Row Migration.Scenario : [message #65635] Wed, 17 November 2004 23:25 Go to next message
BhavinShah
Messages: 105
Registered: February 2004
Senior Member
Dear frends,

I have table main_trn1 and main_trn2

Main_Trn1

id number pk

username varchar2

trans_date number

main_trn2

id fk (main_trn1.id)

trans_log varchar2(4000)

Now Here  I want to remove table main_trn2 but issue is row chaining and row migration..

Now I want to know HOw can i know that row is chained or row is migrated..

Pl. Help me ...

 
Re: Raw Chaining and Row Migration.Scenario : [message #65636 is a reply to message #65635] Thu, 18 November 2004 04:56 Go to previous messageGo to next message
Mahesh Rajendran
Messages: 10707
Registered: March 2002
Location: oracleDocoVille
Senior Member
Account Moderator
>>>Now Here I want to remove table main_trn2 but issue is row chaining and row migration
what makes you to say this?
YOu are removing just a child table.
You loose the child records. Thats it.

what is row migration?
On theory,
Say you have a record 'SCOTT' store somewhere ( in a block).
and You have someother records too, like this in three blocks .
( assume every line as block and start and end of block (size) is marked by 3 ***.).

[b]
***a,b,c 	    ***
***Tiger,SCOTT,Frank***
***sName,oname,aname***
[/b]

Now you update SCOTT to somethingelse..say SCOTTNandy.
And You may think the row is placed like this.!
Acutally NO!

[b]
***a,b,c 	         ***
***Tiger,SCOTTNandy,Frank***
***sName,oname,aname     ***
[/b]
It   depends.
If there is enough room for updated record , it will be placed there.
The above update does not fit it there ( see the 2 block is bigg).
SO the row is migrated to another block!. In order maintain things (integrity,index) oracle leaves
a kind of forwarding address in the old place that refers to new place.
[b]
***a,b,c            ***
***Tiger,go_4,Frank ***
***sName,oname,aname***
***SCOTTNandy       ***

[/b]
So this row is called as an Migrated Row.

what is a chained row?

Now what if you have updated SCOTT to 'SCOTTWilliamAchenbach' or something BIG enough that will
NOT EVEN FIT In the fourth block ( or the updated row is BIGGER than the block size. what if the blocksize is
4k and rowsize 8k?)?
In that case a the row is split between the blocks ( and an internal mechanism CHAINS them).
Somthing like
[b]
***a,b,c            ***
***Tiger,go_4,Frank ***
***sName,oname,aname***
***SCOTTWilliam_go_5***
***from_4_Achenbach *** 
[/b]
So if you look further into this you can see that,
a migrated row can be a chained row.
But a chained row may or may not be a migrated row.

All above discussed to the greatest possible extent in server concepts manual.


[Updated on: Fri, 05 May 2006 03:46]

Report message to a moderator

Great explanation. [message #65650 is a reply to message #65636] Mon, 22 November 2004 22:20 Go to previous message
BhavinShah
Messages: 105
Registered: February 2004
Senior Member
Thax..
Bhavin
Previous Topic: Data insertion in LOBs cause table to Grow Rapidly
Next Topic: Can I tune this .
Goto Forum:
  


Current Time: Wed Apr 17 22:09:11 CDT 2024