602SQL Documentation Index  

_IV_PROFILE System Query

The system query _iv_profile returns the 602SQL Server profiling result.

The names of the grid columns may be in a different order than the order specified here when you are displaying information in the window (using the Profiler action in the System/Tools folder).

Column description

Column name Type Contents
Category_name (Class name) CHAR(31) Name of the watched class ("Critical section", "Record lock", "Index page lock", "Activity", "Routine", "Trigger", "SQL statement", "Source Line" "Thread"). Critical sections have minimum relevance for server users (others are more important). "Activity" concerns disc writing and reading.
Object_number INT Serves only to distinguish objects with identical names and can be ignored in most cases (including internal number of a "Critical section", unique number of a session for a "Thread" class).
Object_name CHAR(31) Name of a routine or name of a table waiting for locks. Serves only for distinguishing objects with identical names and may be ignored in most cases. Equals to the internal name of a critical section in rows concerning "Critical sections" or to the thread session name (set by _sqp_set_thread_name procedure) on rows concerning "Threads". For "Activity" class serves for distinguishing Read/Write.
Line_number INT The line number is relevant only when the profiling is done "one line after another" in routines. The time spent on executing this line of the routine can be traced. Is empty for other categories then "Source Line".
SQL CLOB Text of the SQL statement that is being profiled. Statements in a stored routine will not be profiled (in fact they are profiled only in the context of routine profiling by lines)
Hit_count INT Specifies the number of routines, SQL statement executions, waiting locks, or critical sections entered. Specifies number of requests on server on rows describing "Threads".
Brutto_time NUMERIC(9,3) The time spent in execution of action described in the profile line in seconds (with accuracy to thousandths of second).
Netto_time NUMERIC(9,3) For routine categories, triggers and SQL commands - their actual execution time. In contrast to gross time, it does not include the time spent by execution of other routines. Thus the net time is less than gross time, provided that during routine or trigger execution, or an SQL command some other routine or trigger was called.
Active_time NUMERIC(9,3) For routine categories, triggers, SQL commands and threads - in contrast to the gross time, it does not include the time spent in waiting for locks, by means of which other threads temporarily block execution of some actions.

Example

Select info about threads with a name:

SELECT object_name, hit_count, brutto_time, netto_time, active_time 
FROM _iv_profile
WHERE category_name='Thread' AND object_name IS NOT NULL