Icon ENABLE STATEMENT LOGGING

Enables engine-wide, SQL statement performance logging for ElevateDB.

Syntax
ENABLE STATEMENT LOGGING
[MINIMUM EXECUTION <MinExecutionTime>]
[MAXIMUM LOGGED <MaxNumStatements>]

<MinExecutionTime> = The minimum execution time, in seconds, of an SQL statement

<MaxNumStatements> = The maximum number of logged SQL statements allowed

Usage
Use this statement to enable SQL statement performance logging for the ElevateDB engine (or ElevateDB Server).

The MINIMUM EXECUTION clause is optional and allows you to specify the minimum amount of time, in seconds, that an SQL statement must execute before it is logged. The specified minimum execution time must be greater than 0, and the default minimum execution time is 30 seconds.

The MAXIMUM LOGGED clause is optional and allows you to specify the maximum number of SQL statements that will be logged at one time. The specified maximum number of SQL statements must be greater than 0, and the default maximum number of SQL statements is 128.

Information You can execute this statement multiple times with different clauses in order to adjust the statement logging parameters. Also, the logged SQL statements are ordered by their execution time, so adjusting either of these values can effect which SQL statements are present in the log (after the ENABLE STATEMENT LOGGING statement is executed).

After enabling SQL statement logging, you can query the LoggedStatements system information table in order to find out which SQL statements have performance issues.

Examples
ENABLE STATEMENT LOGGING
MINIMUM EXECUTION 10
MAXIMUM LOGGED 256

Required Privileges
The current user must be granted the system-defined Administrators role in order to execute this statement. Please see the User Security topic for more information.

SQL 2003 Standard Deviations
This statement deviates from the SQL 2003 standard in the following ways:

DeviationDetails
ExtensionThis SQL statement is an ElevateDB extension.
Image