Want to protect your cyber security and still get fast solutions? Ask a secure question today.Go Premium

x
  • Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 513
  • Last Modified:

Oracle statistics

Hey how so we find the current oracle statistics for a particular statement and when was the last statistics change and lastly how do we change statistics. I really appreciate your time and help in advance
0
hussainkhan22
Asked:
hussainkhan22
  • 2
  • 2
1 Solution
 
slightwv (䄆 Netminder) Commented:
Statistics are on objects like tables.

Statements are DL and DML.

What are you asking?  Are you wanting execution plans?
0
 
slightwv (䄆 Netminder) Commented:
the docs as always...

>>how do we change statistics

The DBMS_STATS package:
http://download.oracle.com/docs/cd/E11882_01/server.112/e16638/stats.htm#PFGRF30102


>>current oracle statistics

http://download.oracle.com/docs/cd/B13789_01/server.101/b10752/stats.htm#41106


>>when was the last statistics change

last_analyzed column for the object  for tables: select owner, table_name, last_analyzed form dba_tables;
0
 
sdstuberCommented:
if you're looking for statistics about sql statements, try these views

v$sql
v$sqlarea
V$SQL_SHARED_MEMORY
v$sql_plan
v$sql_plan_statistics
v$sql_plan_statistics_all
v$sql_workarea
v$sql_workarea_histogram
0
 
sdstuberCommented:
if you are looking for object statistics instead of statement statistics

check dba_jobs and dba_scheduler_jobs for processes that automatically gather statistics- those will tell you the "when" and that's where you can change the scheduling too

it's possible you may have a cron job or other external scheduler do it too, but that's not standard
0

Featured Post

Free Tool: Subnet Calculator

The subnet calculator helps you design networks by taking an IP address and network mask and returning information such as network, broadcast address, and host range.

One of a set of tools we're offering as a way of saying thank you for being a part of the community.

  • 2
  • 2
Tackle projects and never again get stuck behind a technical roadblock.
Join Now