Home IT Linux Windows Database Network Programming Server Mobile  
           
  Home \ Database \ Using DBMS_STAT function closes mission     - Linux Powerful IDE - Geany configuration instructions (Linux)

- Ubuntu 14.04 / 13.10 users how to install Ubuntu Touch core applications (Linux)

- Use Epoll develop high-performance application server on Linux (Server)

- MySQL innodb_table_stats table does not exist solution (Database)

- To install the Git and Github under Ubuntu (Linux)

- Android memory optimization of the disk cache (Linux)

- MongoDB common optimization settings in Linux (Database)

- How to find an IP address through the command line (Linux)

- DELL D630 Wireless LAN Driver Installation CentOS6 (Linux)

- Linux, Eclipse flash back and reinstall the JDK methods (Linux)

- JDK comes with tools JPS (Linux)

- You really do need to know a variety of programming languages (Programming)

- Ubuntu 14.04 virtual machine switching desktop environments (Linux)

- Usage logs Python library (Programming)

- CKEditor + SWFUpload achieve a more powerful editor (Linux)

- Varnish configuration language VCL and its built-in variables (Server)

- count (*) function in MySQL optimization of InnoDB storage engine (Database)

- RedHat Redis Linux installation (Database)

- Ansible module Know (Linux)

- Rails project prepared some tips small experience (Linux)

 
         
  Using DBMS_STAT function closes mission
     
  Add Date : 2018-11-21      
         
       
         
  View over the following statement to read physically larger SQL statement

select executions,
      disk_reads,
      buffer_gets,
      round ((buffer_gets - disk_reads) / buffer_gets, 2) Hit_radio,
      round (disk_reads / executions, 2) reads_per_run,
      sql_text,
      sql_id,
      last_load_time
  From v $ sqlarea
 Where executions> 0
  and buffer_gets> 0
  and (buffer_gets - disk_reads) / buffer_gets < 0.8
  and last_load_time> to_date ( '2015-04-19', 'yyyy / mm / dd')
 Order by 4 desc;

Just to see the statements disk read is very high and the number of executions will be more.

call dbms_stats.gather_database_stats_job_proc ()

GATHER_DATABASE_STATS_JOB_PROC internal stored procedure is basically the same as with DBMS_STATS.GATHER_DATABASE_STATS features, but there are priorities of internal considerations, the more updated the priority list will collect statistical information.
Because of the work consumes a larger plan to close, here you need to use DBMS_SCHDULER built-in functions, built-in functions are the following procedure calls
......
CREATE_PROGRAM
DROP_PROGRAM
CREATE_JOB
CREATE_SCHEDULE
DROP_SCHEDULE
DISABLE
ENABLE
......

And here we need to use the following statement to close the specified task
EXEC DBMS_SCHEDULER.DISABLE ( 'GATHER_STATS_JOB');

DISABLE (NAME, FORCE, COMMIT_SEMANTICS) that are listed in the task name, whether to force, if submitted, the latter two default Y
ENBABLE (NAME, COMMIT_SEMANTICS) same
Task Scheduler can be created in the following ways
123 DBMS_SCHDULER.CREATE_JOB ( 'job_name', 'job_type', 'job_action', 'number_of_arguments',
'Start_date', 'repeat_interval', 'end_date', 'job_class', 'enabled', 'auto_drop',
'Comments', 'credential_name', 'destination_name')

Column such as:
BEGIN
DBMS_SCHEDULER.CREATE_JOB
(
JOB_NAME => 'ARC_MOVE',
SCHEDULE_NAME => 'EVERY_60_MINS',
JOB_TYPE => 'EXECUTABLE',
JOB_ACTION => '/U01/SCRIPTS/MOVE_ARCS.SH',
ENABLED => TRUE,
COMMENTS => 'MOVE ARCHIVED LOGS TO A DIFFERENT DIRECTORY'
);
END;

It may also be
DBMS_SCHDULER.CREATE_SCHEDULE (SCHEDULE_NAME, START_DATE, REPEAT_INTERVAL, END_DATE, COMMENTS)

Column such as:
BEGIN
  DBMS_SCHEDULER.CREATE_SCHEDULE
  (
  REPEAT_INTERVAL => 'FREQ = MINUTELY; INTERVAL = 1',
  START_DATE => SYSDATE,
  COMMENTS => 'rosanu_create_job',
  SCHEDULE_NAME => 'SCHEDULE_ROSANU'
  );
END;

Wherein repeat_interval worth noting here is to provide a scheduled task execution time interval.
FREQ keyword indicates frequency, optional parameters are:
YEARLY (years),
MONTHLY (month),
WEEKLY (weeks)
DAILY (day),
HOURLY (time),
MINUTELY (points),
SECONDLY (s)

INTERVAL keyword indicates that the frequency range of 1 to 999. Hereinafter referred to as run once every 10 days:
REPEAT_INTERVAL => 'FREQ = DAILY; INTERVAL = 10';

BYDAY keyword table specific day time, perform the following represents five per week
REPEAT_INTERVAL => 'FREQ = DAILY; BYDAY = FRI';

BYMONTHDAY keyword table the first few days of the month following the last day of each month showing
REPEAT_INTERVAL => 'FREQ = MONTHLY; BYMONTHDAY = -1';

BYMONTH keyword represents a specific month
REPEAT_INTERVAL => 'FREQ = YEARLY; BYMONTH = MAR; BYMONTHDAY = 10';

BYDATE keyword to specify the number of days by value
REPEAT_INTERVAL => 'FREQ = YEARLY; BYDATE = 0310';

BYHOUR keyword indicates hours
REPEAT_INTERVAL => 'FREQ = DAILY; BYHOUR = 16,17,18';

You can also specify the way through

REPEAT_INTERVAL => 'trunc (sysdate) +1'
On the database by the following statement to view the current all tasks
SELECT OWNER,
      JOB_NAME,
      JOB_ACTION,
      REPEAT_INTERVAL,
      LAST_START_DATE,
      COMMENTS
  FROM ALL_SCHEDULER_JOBS

In addition there DBA_SCHEDULER_JOBS and USER_SCHEDULER_JOBS, USER table does OWNER field.
     
         
       
         
  More:      
 
- Wine 1.7 is installed on a system based on RedHat or Debian (Linux)
- nginx.conf Optimization (Server)
- SSH security note (Linux)
- Oracle 11g DataGuard service to start automatically (Database)
- Examples 14 grep command (Linux)
- RHEL6.4 x86_64 build SVN service (Server)
- Mysql binlog resolve the garbage problem decryption (Database)
- CentOS6.0 successful installation and configuration OpenCV (Linux)
- A step by step teach have to install multi-node cluster configuration Hadoop (Server)
- Ubuntu user use PPA to install Uget 2.0.5 (Linux)
- MyCAT separate read and write to achieve MySQL Practice (Database)
- Installation and operation GAMIT software under Linux operating system (Linux)
- 3 tips Linux command (Linux)
- Linux system security check notes on performance (Linux)
- Why HBase need to build SQL engine layer (Database)
- Unity Greeter Badges: the lost session icon back to the login screen Ubuntu (Linux)
- Ubuntu treated with cue file to ape and wav files automatically track points (Linux)
- Performance comparison Fibonacci recursive and non-recursive (Programming)
- How to compile and install wxWidgets in Ubuntu / Debian / Linux Mint (Linux)
- MySQL use the integer type (Database)
     
           
     
  CopyRight 2002-2016 newfreesoft.com, All Rights Reserved.