Checking SQL Statements (Informix)
Use
You can use the
detailed database analysis in the SAP/Informix database monitor to check SQL statements. This allows you to monitor the statistics for SQL statements, so enabling identification of statements that are consuming an excessive amount of resources, for example, when the amount of data to be processed is very large.Prerequisites
Check the settings of the following parameters from the Informix
ONCONFIG file before starting this procedure:You must set this variable in one of the following ways if you want to see information on SQL statements:
No time measurement is performed.
Time measurement is performed.
If you are using time measurement (see
SQLSTATS 2 ), then make sure you set the variable as follows:USEOSTIME 1
If you set the value of
USEOSTIME to 0, the time measurement is imprecise. Setting it to 1 makes sure you get more accurate measurements, but uses more processing resources. Therefore, we recommend you set it to 0 when you have finished looking at SQL statements.To view the statistics for SQL statements from all applications, you must set the environment variable as the user who starts the database (that is,
<sid>adm ). Otherwise, you can only view statistics for the applications you start. If you only set SQLSTATS for one application host, the values displayed in the procedure below only refer to SQL statements sent from the single application host.Procedure
The system prompts you for Selection Criteria (Session ID, Buffer Reads, and so on).
The system displays details of SQL statements. For more information, see
See also:
USEOSTIME (Informix)