Home » SQL & PL/SQL » SQL & PL/SQL » How to Check the date for the statistics last generated
How to Check the date for the statistics last generated [message #306184] Thu, 13 March 2008 03:12 Go to next message
pokhraj_das
Messages: 64
Registered: February 2008
Member

Hi,

I want to know how can i check the date and time for the last statistics generated.
I am using Cost based optomizer(CBO)

Pokhraj
Re: How to Check the date for the statistics last generated [message #306185 is a reply to message #306184] Thu, 13 March 2008 03:19 Go to previous messageGo to next message
Frank
Messages: 7880
Registered: March 2000
Senior Member
Check all_tables/all_indexes
Re: How to Check the date for the statistics last generated [message #306192 is a reply to message #306184] Thu, 13 March 2008 04:21 Go to previous messageGo to next message
pokhraj_das
Messages: 64
Registered: February 2008
Member

Hi,

Thanx for the reply. Its really helped me a lot.

Could you please let me know if I use the dbms_stats.gather_schema_stats(<schema_name>) package then what will be the approach for checking the last generated statistics.

Regards-
pokhraj
Re: How to Check the date for the statistics last generated [message #306196 is a reply to message #306192] Thu, 13 March 2008 04:43 Go to previous messageGo to next message
Michel Cadot
Messages: 64151
Registered: March 2007
Location: Nanterre, France, http://...
Senior Member
Account Moderator
Isn't this the same question? Otherwise precise your question.

Regards
Michel
Re: How to Check the date for the statistics last generated [message #306197 is a reply to message #306184] Thu, 13 March 2008 04:52 Go to previous messageGo to next message
pokhraj_das
Messages: 64
Registered: February 2008
Member

I do have some confusion.

My first question:-

1. If i use ALTER TABLE ..... ANALYZE command then I can use the all_tables/all_indexes to check the last analysed date.

2. If I use the dbms_stats.gather_schema_stats(<schema_name>) then which view I have to check for last generated statistics date?

Pokhraj
Re: How to Check the date for the statistics last generated [message #306208 is a reply to message #306197] Thu, 13 March 2008 05:14 Go to previous messageGo to next message
Michel Cadot
Messages: 64151
Registered: March 2007
Location: Nanterre, France, http://...
Senior Member
Account Moderator
Same thing.
NEVER mix up the 2 ways to calculate statistics.
Better choose dbms_stats, "analyze ... statistics" is kept for backward compatibility.

Regards
Michel

[Updated on: Thu, 13 March 2008 05:17]

Report message to a moderator

Re: How to Check the date for the statistics last generated [message #306210 is a reply to message #306184] Thu, 13 March 2008 05:16 Go to previous message
pokhraj_das
Messages: 64
Registered: February 2008
Member

Great . Thanx for your valuable advice.

Pokhraj
Previous Topic: sql help
Next Topic: char comparision
Goto Forum:
  


Current Time: Fri Dec 09 19:41:30 CST 2016

Total time taken to generate the page: 0.07005 seconds