-
In running some performance tests for file creation, I came across a discrepancy in SET TIME ON and SET TIMING ON in sql*plus. These commands are run from a script, hence the lack of elapsed time in the SQL> prompt.
Here is the example:
17:34:37 SQL> create tablespace test1
17:34:37 SQL> datafile '/db01/oradata/TEST/test01.dbf' size 100m;
Tablespace created.
Elapsed: 00:00:10.88
17:34:44 SQL> create tablespace test2
17:34:44 SQL> datafile '/db01/oradata/TEST/test02a.dbf' size 100m,
17:34:44 SQL> datafile '/db01/oradata/TEST/test02b.dbf' size 100m;
The clock shows a 7 second change, while the elapsed shows an 11 second change.
Subsequent statements show a similar value variance (c. 40%) regardless of the actual duration.
Oracle does not explain where these values come from (Metalink says see the documentation, the documentation says see the platform specific doc, the platform specific doc says nothing...). I have some idea as to where they come from, but it does not explain the rather wide discrepancy.