Home » RDBMS Server » Server Administration » Oracle analyze
Oracle analyze [message #272742] Sat, 06 October 2007 23:16 Go to next message
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 #272746 is a reply to message #272742] Sat, 06 October 2007 23:51 Go to previous messageGo to next message
BlackSwan
Messages: 25046
Registered: January 2009
Location: SoCal
Senior Member
>results is different.
OK, different for WHAT????
We are not looking over your shoulder & seeing what you are seeing.
>When oracle will give the correct result.
HUH?
What results does Oracle give & how do you (or I) know it is correct?

Answer is 5! is that correct?

I am not sure what exactly is the question?
Re: Oracle analyze [message #272748 is a reply to message #272742] Sun, 07 October 2007 00:04 Go to previous messageGo to next message
tanmoy1048
Messages: 133
Registered: June 2007
Senior Member
for smart answer.
>Select count(*) from test
whats the output of this SQL?the number of rows.
>select num_rows from tabs where table_name='TEST';
whats the output of this SQL?the number of rows after gathering the statistics.And sometimes the results are different. My question was WHY??

Anyway I got the answer,
http://download.oracle.com/docs/cd/B19306_01/server.102/b14231/tasks.htm#ADMIN0235

[mod-edit] removed illiterate IM speak.

[Updated on: Mon, 08 October 2007 08:11] by Moderator

Report message to a moderator

Re: Oracle analyze [message #272751 is a reply to message #272742] Sun, 07 October 2007 00:14 Go to previous messageGo to next message
BlackSwan
Messages: 25046
Registered: January 2009
Location: SoCal
Senior Member
>Anyway I got the answer,
>htt://download.oracle.com/docs/cd/B19306_01/server.102/b14231/tasks.htm#ADMIN0235

Color me dense.
If the answer has been available for more than a day or two,
what exactly is the answer & why was the question even asked?

NOTHING that has been posted allows anyone to confirm or deny ANY statement regarding any "problem" or "solution".

[Updated on: Sun, 07 October 2007 00:22] by Moderator

Report message to a moderator

Re: Oracle analyze [message #272852 is a reply to message #272748] Mon, 08 October 2007 01:11 Go to previous messageGo to next message
Littlefoot
Messages: 20901
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 Go to previous messageGo to next message
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 Go to previous message
Michel Cadot
Messages: 64139
Registered: March 2007
Location: Nanterre, France, http://...
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
Previous Topic: Find the unused tables
Next Topic: conversion of NLS_CHARACTERSET FROM AL32UTF8 TO UTF8
Goto Forum:
  


Current Time: Fri Dec 09 00:05:12 CST 2016

Total time taken to generate the page: 0.08063 seconds