This is the multi-page printable view of this section. Click here to print.

Return to the regular view of this page.

Profiling functions

This section contains profiling functions specific to Vertica.

This section contains profiling functions specific to Vertica.

1 - CLEAR_PROFILING

Clears from memory data for the specified profiling type.

Clears from memory data for the specified profiling type.

This is a meta-function. You must call meta-functions in a top-level SELECT statement.

Behavior type

Volatile

Syntax

CLEAR_PROFILING( 'profiling-type' [, 'scope'] )

Parameters

profiling-type
The type of profiling data to clear:
  • session: Clear profiling for basic session parameters and lock time out data.

  • query: Clear profiling for general information about queries that ran, such as the query strings used and the duration of queries.

  • ee: Clear profiling for information about the execution run of each query.

scope
Specifies at what scope to clear profiling on the specified data, one of the following:
  • local: Clear profiling data for the current session.

  • global: Clear profiling data across all database sessions.

Examples

The following statement clears profiled data for queries:

=> SELECT CLEAR_PROFILING('query');

See also

2 - DISABLE_PROFILING

Disables for the current session collection of profiling data of the specified type.

Disables for the current session collection of profiling data of the specified type. For detailed information, see Enabling profiling.

This is a meta-function. You must call meta-functions in a top-level SELECT statement.

Behavior type

Volatile

Syntax

DISABLE_PROFILING( 'profiling-type' )

Parameters

profiling-type
The type of profiling data to disable:
  • session: Disables profiling for basic session parameters and lock time out data.

  • query: Disables profiling for general information about queries that ran, such as the query strings used and the duration of queries.

  • ee: Disables profiling for information about the execution run of each query.

Examples

The following statement disables profiling on query execution runs:

=> SELECT DISABLE_PROFILING('ee');
   DISABLE_PROFILING
-----------------------
 EE Profiling Disabled
(1 row)

See also

3 - ENABLE_PROFILING

Enables collection of profiling data of the specified type for the current session.

Enables collection of profiling data of the specified type for the current session. For detailed information, see Enabling profiling.

This is a meta-function. You must call meta-functions in a top-level SELECT statement.

Behavior type

Volatile

Syntax

ENABLE_PROFILING( 'profiling-type' )

Parameters

profiling-type
The type of profiling data to enable:
  • session: Enable profiling for basic session parameters and lock time out data.

  • query: Enable profiling for general information about queries that ran, such as the query strings used and the duration of queries.

  • ee: Enable profiling for information about the execution run of each query.

Examples

The following statement enables profiling on query execution runs:

=> SELECT ENABLE_PROFILING('ee');
   ENABLE_PROFILING
----------------------
 EE Profiling Enabled
(1 row)

See also

4 - SHOW_PROFILING_CONFIG

Shows whether profiling is enabled.

Shows whether profiling is enabled.

This is a meta-function. You must call meta-functions in a top-level SELECT statement.

Behavior type

Stable

Syntax

SHOW_PROFILING_CONFIG ()

Examples

The following statement shows that profiling is enabled globally for all profiling types (session, execution engine, and query):

=> SELECT SHOW_PROFILING_CONFIG();
SHOW_PROFILING_CONFIG
------------------------------------------
 Session Profiling: Session off, Global on
 EE Profiling:      Session off, Global on
 Query Profiling:   Session off, Global on
(1 row)

See also