Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Shaun E on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Syntax for viewing Statistics 1

Status
Not open for further replies.

MSIsam

Programmer
Sep 29, 2003
173
US
What is the SL syntax to view Statistics on a table? (I.e. what columns that stats are collected on and the last ime collected). I am coming from the Teradata world and do not know the Oracle syntax.

Thanks for your help!
Sam
 
Sam,

The data dictionary views that show table statistics are the "..._tables" views. (The reason I say "..._tables" views is because there are USER_TABLES (tables that the querying schema owns), ALL_TABLES (tables to which the querying schema has access), and DBA_TABLES (all tables in the database regardless of ownership).

These views show all of the currently gathered statistics. One of the columns is "LAST_ANALYZED", which shows the date and time of last statistics gathering for each table. The other statistical columns are too numerous to list here, so you can see them by issuing a "describe user_tables" (for example).

Let us know if this resolved your question.

[santa]Mufasa
(aka Dave of Sandy, Utah, USA)
@ 16:30 (08Dec04) UTC (aka "GMT" and "Zulu"),
@ 09:30 (08Dec04) Mountain Time
 
Thanks SantaMufasa.
Exactly what I need!
 
For future reference, it will help focus answers (as well as reduce clutter and storage requirements - not to mention people burning time responding to questions that have already been answered) if you just post the question once, in the appropriate forum (i.e., the version of Oracle that matches what you are using).
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top