Oracle analyze [message #272742] |
Sat, 06 October 2007 23:16 |
tanmoy1048
Messages: 133 Registered: June 2007
|
Senior Member |
|
|
I m using oracle 10gR2.
When oracle itself analyze(or something) its objects. For example,
I have a table test.Now
Select count(*) from test
And, select num_rows from tabs where table_name='TEST';
results is different. When oracle will give the correct result.
|
|
|
|
|
|
Re: Oracle analyze [message #272852 is a reply to message #272748] |
Mon, 08 October 2007 01:11 |
|
Littlefoot
Messages: 21823 Registered: June 2005 Location: Croatia, Europe
|
Senior Member Account Moderator |
|
|
tanmoy1048,
how does "Managing Automatic System Tasks Using the Maintenance Window" document explain different results between
Select count(*) from test;
and
select num_rows from tabs where table_name='TEST';
Does it mean that you have analyzed the 'TEST' table a long time ago (relatively speaking) and have added/removed records from the same table in the meantime and solved the problem by scheduling ANALYZE regularly, or ...?
[Updated on: Mon, 08 October 2007 01:12] Report message to a moderator
|
|
|
Re: Oracle analyze [message #272878 is a reply to message #272742] |
Mon, 08 October 2007 02:03 |
tanmoy1048
Messages: 133 Registered: June 2007
|
Senior Member |
|
|
I just asked why those results are different.And so far I understand ..its a automatic task that collect the statistics of the table by using that window.
It was not my problem And I didnt schedule any analyze.
thanx
|
|
|
Re: Oracle analyze [message #272895 is a reply to message #272878] |
Mon, 08 October 2007 02:25 |
|
Michel Cadot
Messages: 68718 Registered: March 2007 Location: Saint-Maur, France, https...
|
Senior Member Account Moderator |
|
|
There are different because one is a count by scan of current data and the other one is a statistic of past data.
Regards
Michel
|
|
|