(Contents)(Previous)

Profiling

If the option profile is enabled during an application program's run, statistical data on the processed SQL statements may be obtained. To obtain results, however, the table SYSPROFILE (system table) of the LOCALSYSDBA must have been created during the initialization of the database. If this had not been done, the table has to be created first.

Definition of the table:

create table sysprofile (

username char (18) key,

progname char (18) key,

modname char (18) key,

language char (12) key,

lineno fixed ( 7) key,

parseid char (12) byte key,

stmbegin char (40),

rundate date,

runcount fixed (10),

seconds fixed (12,3) ) ;

For every SQL statement, the beginning of statement, date of runtime, number of calls and accumulated realtime is entered into the table. The realtime consists of the time taken by the processing of a statement within an application program with all the data conversions and of the time needed by the ADABAS kernel. The time needed to enter this information into the table SYSPROFILE is not taken into account. The key of a row consists of the following specifications: user name, program name, module name, language of the application program, line number of the statement within the application program related to the source and the internal parseid. The parseid is integrated into the key in order to be able to distinguish dynamic statements. With the enabled trace option, the time required for writing the trace to a file affects the profiling. Therefore it is not convenient to activate the two options at the same time.

The entries to the SYSPROFILE table are made within the transactions of the application program. Therefore they are only stored in the table when the application program issues a COMMIT WORK.

When the option is enabled, old entries made for username, program name, and language are always deleted at the beginning of the program. After the run, the table LOCALSYSUSER.SYSPROFILE may be looked up by means of QUERY and/or the stored data may be evaluated. The entries remain in the table until they are deleted explicitly or the program is restarted with this option.


(Contents)(Previous)