How gathering of stats/ analyze stats work? [message #338973] |
Wed, 06 August 2008 06:23 |
beetel
Messages: 96 Registered: April 2007
|
Member |
|
|
My colleague says that during gathering of statistics, what happens is that data scattered throughout different blocks are defragmented and put in a sort of adjacent/continuous blocks. I thought that there is no such movement in location of data - but what happens is that the stats table is updated on 'where' the data are and so Oracle can know where to locate them quickly by reading that table.. Am confused here.. please enlighten.
|
|
|
|
|
|
Re: How gathering of stats/ analyze stats work? [message #339012 is a reply to message #338973] |
Wed, 06 August 2008 08:48 |
|
BlackSwan
Messages: 26766 Registered: January 2009 Location: SoCal
|
Senior Member |
|
|
1) pick a table (TABLE_A) & then save ROWIDS to a NEWTABLE1.
2) Gather STATS
3) Save ROWIDs of TABLE_A to NEWTABLE2
4) select * from NEWTABLE1 minus select * from NEWTABLE2.
If "boss" is correct, then many rows returned.
If reality is correct, few or zero rows returned.
(new rows may be reported/returned) & can be eliminated by using date/timestamp qualifier.
|
|
|