|
DECLARE newjob sys.job; newjobarr sys.job_array; newjobname VARCHAR2(30); BEGIN newjobarr := sys.job_array(); newjobarr.extend(10); FOR j IN 1..&1 LOOP FOR i IN 1..10 LOOP newjob := sys.job(job_name => 'LWTJK' || to_char(i) || '_' || to_char(j), job_style => 'LIGHTWEIGHT', job_template => 'PROG_1', ENABLED => TRUE); newjobarr(i) := newjob; END LOOP; INSERT INTO test_log VALUES('LWTJ', 'START', SYSTIMESTAMP); DBMS_SCHEDULER.CREATE_JOBS(newjobarr, 'TRANSACTIONAL'); INSERT INTO test_log VALUES('LWTJ', 'END', SYSTIMESTAMP); END LOOP; END; |
|
DECLARE newjob sys.job; newjobarr sys.job_array; newjobname VARCHAR2(30); BEGIN newjobarr := sys.job_array(); newjobarr.extend(10); FOR j IN 1..&1 LOOP FOR i IN 1..10 LOOP newjob := sys.job(job_name => 'REGJK' || to_char(i) || '_' || to_char(j), job_style => 'REGULAR', job_template => 'PROG_1', ENABLED => TRUE); newjobarr(i) := newjob; END LOOP; INSERT INTO test_log VALUES('REGJOB', 'START', SYSTIMESTAMP); DBMS_SCHEDULER.CREATE_JOBS(newjobarr, 'TRANSACTIONAL'); INSERT INTO test_log VALUES('REGJOB', 'END', SYSTIMESTAMP); END LOOP; END; |
Both the processes use PROG_1 as the job template that is already available.
The time taken by the jobs are recorded in the TEST_LOG table.
While comparing the time taken to create the jobs,the process in exhibit1 takes less time than the process in exhibit2.
What is the reason for this?
A. It updates several tables in the SYSTEM tablespace instead of creating new tables.
B. It creates jobs temporarily in memory only.
C. It creates less metadata for the jobs.
D. It writes the job metadata to disk in compressed format.
答案:(C)
解析:
《Administrator's Guide》 28.3.1.6