Loading...

verticapy.performance.vertica.qprof.QueryProfiler

class verticapy.performance.vertica.qprof.QueryProfiler(transactions: None | str | int | tuple | list[int] | list[tuple[int, int]] | list[str] = None, key_id: str | None = None, resource_pool: str | None = None, target_schema: None | str | dict = None, session_control: None | dict | list[dict] | str | list[str] = None, overwrite: bool = False, add_profile: bool = True, check_tables: bool = True, ignore_operators_check: bool = True, iterchecks: bool = False, print_info: bool = True, run_only_session: bool = True)

Base class to profile queries.

Important

Most of the classes are not available in Version 1.0.0. Please use Version 1.0.1 or higher. Alternatively, you can use the help function to explore the functionalities of your current documentation.

The QueryProfiler is a valuable tool for anyone seeking to comprehend the reasons behind a query’s lack of performance. It incorporates a set of functions inspired by the original QPROF project, while introducing an enhanced feature set. This includes the capability to generate graphics and dashboards, facilitating a comprehensive exploration of the data.

Moreover, it offers greater convenience by allowing interaction with an object that encompasses various methods and expanded possibilities. To initiate the process, all that’s required is a transaction_id and a statement_id, or simply a query to execute.

Parameters

transactions: str | tuple | list, optional

Six options are possible for this parameter:

  • An integer:

    It will represent the transaction_id, the statement_id will be set to 1.

  • A tuple:

    (transaction_id, statement_id).

  • A list of tuples:

    (transaction_id, statement_id).

  • A list of integers:

    the transaction_id; the statement_id will automatically be set to 1.

  • A str:

    The query to execute. If the str ends with ‘.sql’, it is considered a SQL file, and the query inside will be executed.

  • A list of str:

    The list of queries to execute. Each query will be execute iteratively.

    Warning

    It’s important to exercise caution; if the query is time-consuming, it will require a significant amount of time to execute before proceeding to the next steps.

Note

A combination of the three first options can also be used in a list.

key_id: int, optional

This parameter is utilized to load information from another target_schema. It is considered a good practice to save the queries you intend to profile.

resource_pool: str, optional

Specify the name of the resource pool to utilize when executing the query. Refer to the Vertica documentation for a comprehensive list of available options.

Note

This parameter is used only when request is defined.

target_schema: str | dict, optional

Name of the schemas to use to store all the Vertica monitor and internal meta-tables. It can be a single schema or a dictionary of schema used to map all the Vertica DC tables. If the tables do not exist, VerticaPy will try to create them automatically.

session_control: str | dict | list, optional

List of parameters used to alter the session. Example: [{"param1": "val1"}, {"param2": "val2"}, {"param3": "val3"},]. Please note that each input query will be executed with the different sets of parameters.

It can also be a list of str each one representing a query to execute before running the main ones. Example: ALTER SESSION SET param = val

overwrite: bool, optional

If set to True overwrites the existing performance tables.

add_profile: bool, optional

If set to True and the request does not include a profile, this option adds the profile keywords at the beginning of the query before executing it.

Note

This parameter is used only when request is defined.

check_tables: bool, optional

If set to True all the transactions of the different Performance tables will be checked and a warning will be raised in case of incomplete data.

Warning

This parameter will aggregate on many tables using many parameters. It will make the process much more expensive.

ignore_operators_check: bool, optional

If set to False additional tests are done on operator_id

iterchecks: bool, optional

If set to True, the checks are done iteratively instead of using a unique SQL query. Usually checks are faster when this parameter is set to False.

Note

This parameter is used only when check_tables is True.

run_only_session: bool, optional

If set to True, the queries will not be run using the current session parameters. They will be altered using session_control parameter first.

Note

This parameter is used only when session_control is not None.

Attributes

transactions: list

list of tuples: (transaction_id, statement_id). It includes all the transactions of the current schema.

requests: list

list of str: Transactions Queries.

request_labels: list

list of str: Queries Labels.

qdurations: list

list of int: Queries Durations (seconds).

key_id: int

Unique ID used to build up the different Performance tables savings.

request: str

Current Query.

qduration: int

Current Query Duration (seconds).

transaction_id: int

Current Transaction ID.

statement_id: int

Current Statement ID.

session_params_non_default_current: dict

Non Default Session Parameters used to run the current/active query.

target_schema: dict

Name of the schema used to store all the Vertica monitor and internal meta-tables.

target_tables: dict

Name of the tables used to store all the Vertica monitor and internal meta-tables.

v_tables_dtypes: list

Datatypes of all the performance tables.

tables_dtypes: list

Datatypes of all the loaded performance tables.

session_params_non_default: list

list of Non Default Session Parameters used all the queries that are profiled.

overwrite: bool

If set to True overwrites the existing performance tables.

Examples

Initialization

First, let’s import the QueryProfiler object.

from verticapy.performance.vertica import QueryProfiler

There are multiple ways how we can use the QueryProfiler.

  • From transaction_id and statement_id

  • From SQL generated from verticapy functions

  • Directly from SQL query

Transaction ID and Statement ID

In this example, we run a groupby command on the amazon dataset.

First, let us import the dataset:

from verticapy.datasets import load_amazon

amazon = load_amazon()

Then run the command:

query = amazon.groupby(
    columns = ["date"],
    expr = ["MONTH(date) AS month, AVG(number) AS avg_number"],
)

For every command that is run, a query is logged in the query_requests table. We can use this table to fetch the transaction_id and statement_id. In order to access this table we can use SQL Magic.

%load_ext verticapy.sql
%%sql
SELECT *
FROM query_requests
WHERE request LIKE '%avg_number%';

Hint

Above we use the WHERE command in order to filter only those results that match our query above. You can use these filters to sift through the list of queries.

Once we have the transaction_id and statement_id we can directly use it:

qprof = QueryProfiler((45035996273800581, 48))

Important

To save the different performance tables in a specific schema use target_schema='MYSCHEMA', ‘MYSCHEMA’ being the targetted schema. To overwrite the tables, use: overwrite=True. Finally, if you just need local temporary table, use the v_temp_schema schema.

Example:

qprof = QueryProfiler(
    (45035996273800581, 48),
    target_schema='v_temp_schema',
    overwrite=True,
)

Multiple Transactions ID and Statements ID

You can also construct an object based on multiple transactions and statement IDs by using a list of transactions and statements.

qprof = QueryProfiler(
    [(tr1, st2), (tr2, st2), (tr3, st3)],
    target_schema='MYSCHEMA',
    overwrite=True,
)

A key_id will be generated, which you can then use to reload the object.

qprof = QueryProfiler(
    key_id='MYKEY',
    target_schema='MYSCHEMA',
)

You can access all the transactions of a specific schema by utilizing the ‘transactions’ attribute.

qprof.transactions

SQL generated from VerticaPy functions

In this example, we can use the Titanic dataset:

from verticapy.datasets import load_titanic

titanic= load_titanic()

Let us run a simple command to get the average values of the two columns:

titanic["age","fare"].mean()

We can use the current_relation attribute to extract the generated SQL and this can be directly input to the Query Profiler:

qprof = QueryProfiler(
    "SELECT * FROM " + titanic["age","fare"].fillna().current_relation()
)

Directly From SQL Query

The last and most straight forward method is by directly inputting the SQL to the Query Profiler:

qprof = QueryProfiler(
    "select transaction_id, statement_id, request, request_duration"
    " from query_requests where start_timestamp > now() - interval'1 hour'"
    " order by request_duration desc limit 10;"
)

Searching the performance tables...
Setting the requests and queries durations...
Checking all the tables consistency using a single SQL query...
Checking all the tables data types...

The query is then executed, and you can easily retrieve the statement and transaction IDs.

tid = qprof.transaction_id

sid = qprof.statement_id

print(f"tid={tid};sid={sid}")
tid=45035996276913960;sid=3

Or simply:

print(qprof.transactions)
[(45035996276913960, 3)]

To avoid recomputing a query, you can also directly use its statement ID and its transaction ID.

qprof = QueryProfiler((tid, sid))
Searching the performance tables...
Setting the requests and queries durations...
Checking all the tables consistency using a single SQL query...
Checking all the tables data types...

Accessing the different Performance Tables

We can easily look at any Vertica Performance Tables easily:

qprof.get_table('dc_requests_issued')
📅
time
Timestamptz(35)
Abc
node_name
Varchar(128)
Abc
session_id
Varchar(128)
123
user_id
Integer
Abc
user_name
Varchar(128)
123
transaction_id
Integer
123
statement_id
Integer
123
request_id
Integer
Abc
request_type
Varchar(128)
Abc
label
Varchar(128)
Abc
Varchar(64000)
Abc
Varchar(64000)
123
query_start_epoch
Integer
Abc
Varchar(64000)
010
is_retry
Boolean
123
digest
Integer
12024-10-31 11:39:54.166330-04:00v_mldb_node0001v_mldb_node0001-123346:0xf2be5b45035996273704962release450359962769120342872874QUERY_version191466
❌
8903476768692993780
22024-10-31 11:39:54.270493-04:00v_mldb_node0001v_mldb_node0001-123346:0xf2be5b45035996273704962release450359962769120342972875QUERY191466
❌
-1608247381113320213
32024-10-31 11:39:54.374382-04:00v_mldb_node0001v_mldb_node0001-123346:0xf2be5b45035996273704962release450359962769120343072876QUERY_version191466
❌
8903476768692993780
42024-10-31 11:39:54.477668-04:00v_mldb_node0001v_mldb_node0001-123346:0xf2be5b45035996273704962release450359962769120343172877QUERY191466
❌
-1608247381113320213
52024-10-31 11:39:54.581248-04:00v_mldb_node0001v_mldb_node0001-123346:0xf2be5b45035996273704962release450359962769120343272878QUERYverticapy_json191466
❌
-2739771977645684132
62024-10-31 11:39:54.686602-04:00v_mldb_node0001v_mldb_node0001-123346:0xf2be5b45035996273704962release450359962769120343372879QUERY191466
❌
-3785912666495148182
72024-10-31 11:39:54.788389-04:00v_mldb_node0001v_mldb_node0001-123346:0xf2be5b45035996273704962release450359962769120343472880QUERY_version191466
❌
8903476768692993780
82024-10-31 11:39:54.892125-04:00v_mldb_node0001v_mldb_node0001-123346:0xf2be5b45035996273704962release450359962769120343572881QUERY191466
❌
-1608247381113320213
92024-10-31 11:39:54.989293-04:00v_mldb_node0001v_mldb_node0001-123346:0xf2be5b45035996273704962release450359962769120343672882QUERYverticapy_json191466
❌
-2739771977645684132
102024-10-31 11:39:55.077605-04:00v_mldb_node0001v_mldb_node0001-123346:0xf2be5b45035996273704962release450359962769120343772883QUERYverticapy_json191466
❌
-2739771977645684132
112024-10-31 11:39:55.215448-04:00v_mldb_node0001v_mldb_node0001-123346:0xf2be5b45035996273704962release450359962769120343872884QUERYverticapy_json191466
❌
-2739771977645684132
122024-10-31 11:39:55.323092-04:00v_mldb_node0001v_mldb_node0001-123346:0xf2be5b45035996273704962release450359962769120343972885QUERY191466
❌
6291359946069853830
132024-10-31 11:39:55.480401-04:00v_mldb_node0001v_mldb_node0001-123346:0xf2be5b45035996273704962release450359962769120344072886QUERY191466
❌
-1511400477213475818
142024-10-31 11:39:55.694486-04:00v_mldb_node0001v_mldb_node0001-123346:0xf2be5b45035996273704962release450359962769120344172887QUERY_version191466
❌
8903476768692993780
152024-10-31 11:39:55.832621-04:00v_mldb_node0001v_mldb_node0001-123346:0xf2be5b45035996273704962release450359962769120344272888QUERY191466
❌
-1608247381113320213
162024-10-31 11:39:55.938363-04:00v_mldb_node0001v_mldb_node0001-123346:0xf2be5b45035996273704962release450359962769120344372889QUERY_version191466
❌
8903476768692993780
172024-10-31 11:39:56.039421-04:00v_mldb_node0001v_mldb_node0001-123346:0xf2be5b45035996273704962release450359962769120344472890QUERY191466
❌
-1608247381113320213
182024-10-31 11:39:56.140210-04:00v_mldb_node0001v_mldb_node0001-123346:0xf2be5b45035996273704962release450359962769120344572891QUERY_version191466
❌
8903476768692993780
192024-10-31 11:39:56.239132-04:00v_mldb_node0001v_mldb_node0001-123346:0xf2be5b45035996273704962release450359962769120344672892QUERY191466
❌
-1608247381113320213
202024-10-31 11:39:56.328837-04:00v_mldb_node0001v_mldb_node0001-123346:0xf2be5b45035996273704962release450359962769120344772893QUERYverticapy_json191466
❌
-2739771977645684132
212024-10-31 11:39:56.416225-04:00v_mldb_node0001v_mldb_node0001-123346:0xf2be5b45035996273704962release450359962769120344872894QUERY191466
❌
-3785912666495148182
222024-10-31 11:39:56.575830-04:00v_mldb_node0001v_mldb_node0001-123346:0xf2be5b45035996273704962release450359962769120344972895QUERY_version191466
❌
8903476768692993780
232024-10-31 11:39:56.662761-04:00v_mldb_node0001v_mldb_node0001-123346:0xf2be5b45035996273704962release450359962769120345072896QUERY191466
❌
-1608247381113320213
242024-10-31 11:39:56.750831-04:00v_mldb_node0001v_mldb_node0001-123346:0xf2be5b45035996273704962release450359962769120345172897QUERYverticapy_json191466
❌
-2739771977645684132
252024-10-31 11:39:56.836362-04:00v_mldb_node0001v_mldb_node0001-123346:0xf2be5b45035996273704962release450359962769120345272898QUERYverticapy_json191466
❌
-2739771977645684132
262024-10-31 11:39:56.920826-04:00v_mldb_node0001v_mldb_node0001-123346:0xf2be5b45035996273704962release450359962769120345372899QUERYverticapy_json191466
❌
-2739771977645684132
272024-10-31 11:39:57.010089-04:00v_mldb_node0001v_mldb_node0001-123346:0xf2be5b45035996273704962release450359962769120345472900QUERY191466
❌
-2966772127294261944
282024-10-31 11:39:57.154934-04:00v_mldb_node0001v_mldb_node0001-123346:0xf2be5b45035996273704962release450359962769120345572901QUERY191466
❌
-5801875823206420603
292024-10-31 11:39:57.305103-04:00v_mldb_node0001v_mldb_node0001-123346:0xf2be5b45035996273704962release450359962769120345672902QUERY_version191466
❌
8903476768692993780
302024-10-31 11:39:57.447558-04:00v_mldb_node0001v_mldb_node0001-123346:0xf2be5b45035996273704962release450359962769120345772903QUERY191466
❌
-1608247381113320213
312024-10-31 11:39:57.582879-04:00v_mldb_node0001v_mldb_node0001-123346:0xf2be5b45035996273704962release450359962769120345872904QUERY_version191466
❌
8903476768692993780
322024-10-31 11:39:57.725882-04:00v_mldb_node0001v_mldb_node0001-123346:0xf2be5b45035996273704962release450359962769120345972905QUERY191466
❌
-1608247381113320213
332024-10-31 11:39:57.831957-04:00v_mldb_node0001v_mldb_node0001-123346:0xf2be5b45035996273704962release450359962769120346072906QUERYverticapy_json191466
❌
-2739771977645684132
342024-10-31 11:39:57.936088-04:00v_mldb_node0001v_mldb_node0001-123346:0xf2be5b45035996273704962release450359962769120346172907QUERY191466
❌
-3785912666495148182
352024-10-31 11:39:58.036803-04:00v_mldb_node0001v_mldb_node0001-123346:0xf2be5b45035996273704962release450359962769120346272908QUERY_version191466
❌
8903476768692993780
362024-10-31 11:39:58.164376-04:00v_mldb_node0001v_mldb_node0001-123346:0xf2be5b45035996273704962release450359962769120346372909QUERY191466
❌
-1608247381113320213
372024-10-31 11:39:58.297094-04:00v_mldb_node0001v_mldb_node0001-123346:0xf2be5b45035996273704962release450359962769120346472910QUERYverticapy_json191466
❌
-2739771977645684132
382024-10-31 11:39:58.412499-04:00v_mldb_node0001v_mldb_node0001-123346:0xf2be5b45035996273704962release450359962769120346572911QUERYverticapy_json191466
❌
-2739771977645684132
392024-10-31 11:39:58.521503-04:00v_mldb_node0001v_mldb_node0001-123346:0xf2be5b45035996273704962release450359962769120346672912QUERYverticapy_json191466
❌
-2739771977645684132
402024-10-31 11:39:58.655320-04:00v_mldb_node0001v_mldb_node0001-123346:0xf2be5b45035996273704962release450359962769120346772913QUERY191466
❌
6291359946069853830
412024-10-31 11:39:58.815239-04:00v_mldb_node0001v_mldb_node0001-123346:0xf2be5b45035996273704962release450359962769120346872914QUERY191466
❌
-1511400477213475818
422024-10-31 11:39:58.985144-04:00v_mldb_node0001v_mldb_node0001-123346:0xf2be5b45035996273704962release450359962769120346972915QUERY_version191466
❌
8903476768692993780
432024-10-31 11:39:59.091641-04:00v_mldb_node0001v_mldb_node0001-123346:0xf2be5b45035996273704962release450359962769120347072916QUERY191466
❌
-1608247381113320213
442024-10-31 11:39:59.197532-04:00v_mldb_node0001v_mldb_node0001-123346:0xf2be5b45035996273704962release450359962769120347172917QUERY_version191466
❌
8903476768692993780
452024-10-31 11:39:59.302978-04:00v_mldb_node0001v_mldb_node0001-123346:0xf2be5b45035996273704962release450359962769120347272918QUERY191466
❌
-1608247381113320213
462024-10-31 11:39:59.409460-04:00v_mldb_node0001v_mldb_node0001-123346:0xf2be5b45035996273704962release450359962769120347372919QUERYverticapy_json191466
❌
-2739771977645684132
472024-10-31 11:39:59.518423-04:00v_mldb_node0001v_mldb_node0001-123346:0xf2be5b45035996273704962release450359962769120347472920QUERY191466
❌
-3785912666495148182
482024-10-31 11:39:59.620678-04:00v_mldb_node0001v_mldb_node0001-123346:0xf2be5b45035996273704962release450359962769120347572921QUERY_version191466
❌
8903476768692993780
492024-10-31 11:39:59.734175-04:00v_mldb_node0001v_mldb_node0001-123346:0xf2be5b45035996273704962release450359962769120347672922QUERY191466
❌
-1608247381113320213
502024-10-31 11:39:59.846604-04:00v_mldb_node0001v_mldb_node0001-123346:0xf2be5b45035996273704962release450359962769120347772923QUERY_version191466
❌
8903476768692993780
512024-10-31 11:39:59.950714-04:00v_mldb_node0001v_mldb_node0001-123346:0xf2be5b45035996273704962release450359962769120347872924QUERY191466
❌
-1608247381113320213
522024-10-31 11:40:00.054377-04:00v_mldb_node0001v_mldb_node0001-123346:0xf2be5b45035996273704962release450359962769120347972925QUERYverticapy_json191466
❌
-2739771977645684132
532024-10-31 11:40:00.152746-04:00v_mldb_node0001v_mldb_node0001-123346:0xf2be5b45035996273704962release450359962769120348072926QUERYverticapy_json191466
❌
-2739771977645684132
542024-10-31 11:40:00.306257-04:00v_mldb_node0001v_mldb_node0001-123346:0xf2be5b45035996273704962release450359962769120348172927QUERY191466
❌
446954750923653105
552024-10-31 11:40:00.497522-04:00v_mldb_node0001v_mldb_node0001-123346:0xf2be5b45035996273704962release450359962769120348272928QUERYverticapy_json191466
❌
-2739771977645684132
562024-10-31 11:40:00.601231-04:00v_mldb_node0001v_mldb_node0001-123346:0xf2be5b45035996273704962release450359962769120348372929QUERYverticapy_json191466
❌
-2739771977645684132
572024-10-31 11:40:00.711160-04:00v_mldb_node0001v_mldb_node0001-123346:0xf2be5b45035996273704962release450359962769120348472930QUERY191466
❌
6366091046319804507
582024-10-31 11:40:00.867119-04:00v_mldb_node0001v_mldb_node0001-123346:0xf2be5b45035996273704962release450359962769120348572931QUERY_version191466
❌
8903476768692993780
592024-10-31 11:40:00.972587-04:00v_mldb_node0001v_mldb_node0001-123346:0xf2be5b45035996273704962release450359962769120348672932QUERY191466
❌
-1608247381113320213
602024-10-31 11:40:01.077417-04:00v_mldb_node0001v_mldb_node0001-123346:0xf2be5b45035996273704962release450359962769120348772933QUERY_version191466
❌
8903476768692993780
612024-10-31 11:40:01.181696-04:00v_mldb_node0001v_mldb_node0001-123346:0xf2be5b45035996273704962release450359962769120348872934QUERY191466
❌
-1608247381113320213
622024-10-31 11:40:01.287498-04:00v_mldb_node0001v_mldb_node0001-123346:0xf2be5b45035996273704962release450359962769120348972935QUERYverticapy_json191466
❌
-2739771977645684132
632024-10-31 11:40:01.393194-04:00v_mldb_node0001v_mldb_node0001-123346:0xf2be5b45035996273704962release450359962769120349072936QUERY191466
❌
-7383708702660407858
642024-10-31 11:40:01.499097-04:00v_mldb_node0001v_mldb_node0001-123346:0xf2be5b45035996273704962release450359962769120349172937QUERY191466
❌
-7383708702660407858
652024-10-31 11:40:01.620086-04:00v_mldb_node0001v_mldb_node0001-123346:0xf2be5b45035996273704962release450359962769120349272938QUERY_version191466
❌
8903476768692993780
662024-10-31 11:40:01.769392-04:00v_mldb_node0001v_mldb_node0001-123346:0xf2be5b45035996273704962release450359962769120349372939QUERY191466
❌
-1608247381113320213
672024-10-31 11:40:01.922751-04:00v_mldb_node0001v_mldb_node0001-123346:0xf2be5b45035996273704962release450359962769120349472940QUERY_version191466
❌
8903476768692993780
682024-10-31 11:40:02.059694-04:00v_mldb_node0001v_mldb_node0001-123346:0xf2be5b45035996273704962release450359962769120349572941QUERY191466
❌
-1608247381113320213
692024-10-31 11:40:02.174911-04:00v_mldb_node0001v_mldb_node0001-123346:0xf2be5b45035996273704962release450359962769120349672942QUERY191466
❌
-4202417065770681422
702024-10-31 11:40:02.284279-04:00v_mldb_node0001v_mldb_node0001-123346:0xf2be5b45035996273704962release450359962769120349772943QUERYverticapy_json191466
❌
-2739771977645684132
712024-10-31 11:40:02.395887-04:00v_mldb_node0001v_mldb_node0001-123346:0xf2be5b45035996273704962release450359962769120349872944QUERY191466
❌
-7649610067607386940
722024-10-31 11:40:02.556101-04:00v_mldb_node0001v_mldb_node0001-123346:0xf2be5b45035996273704962release450359962769120349972945QUERY191466
❌
-7649610067607386940
732024-10-31 11:40:02.743191-04:00v_mldb_node0001v_mldb_node0001-123346:0xf2be5b45035996273704962release4503599627691203410072946QUERY_version191466
❌
8903476768692993780
742024-10-31 11:40:02.852667-04:00v_mldb_node0001v_mldb_node0001-123346:0xf2be5b45035996273704962release4503599627691203410172947QUERY191466
❌
-1608247381113320213
752024-10-31 11:40:02.961584-04:00v_mldb_node0001v_mldb_node0001-123346:0xf2be5b45035996273704962release4503599627691203410272948QUERY_version191466
❌
8903476768692993780
762024-10-31 11:40:03.066649-04:00v_mldb_node0001v_mldb_node0001-123346:0xf2be5b45035996273704962release4503599627691203410372949QUERY191466
❌
-1608247381113320213
772024-10-31 11:40:03.158244-04:00v_mldb_node0001v_mldb_node0001-123346:0xf2be5b45035996273704962release4503599627691203410472950QUERY191466
❌
-4202417065770681422
782024-10-31 11:40:03.253528-04:00v_mldb_node0001v_mldb_node0001-123346:0xf2be5b45035996273704962release4503599627691203410572951QUERYverticapy_json191466
❌
-2739771977645684132
792024-10-31 11:40:03.361351-04:00v_mldb_node0001v_mldb_node0001-123346:0xf2be5b45035996273704962release4503599627691203410672952QUERY191466
❌
-7649610067607386940
802024-10-31 11:40:03.474847-04:00v_mldb_node0001v_mldb_node0001-123346:0xf2be5b45035996273704962release4503599627691203410772953QUERY191466
❌
-7649610067607386940
812024-10-31 11:40:03.636203-04:00v_mldb_node0001v_mldb_node0001-123346:0xf2be5b45035996273704962release4503599627691203410872954QUERY_version191466
❌
8903476768692993780
822024-10-31 11:40:03.739478-04:00v_mldb_node0001v_mldb_node0001-123346:0xf2be5b45035996273704962release4503599627691203410972955QUERY191466
❌
-1608247381113320213
832024-10-31 11:40:03.840249-04:00v_mldb_node0001v_mldb_node0001-123346:0xf2be5b45035996273704962release4503599627691203411072956QUERY_version191466
❌
8903476768692993780
842024-10-31 11:40:03.941101-04:00v_mldb_node0001v_mldb_node0001-123346:0xf2be5b45035996273704962release4503599627691203411172957QUERY191466
❌
-1608247381113320213
852024-10-31 11:40:04.048766-04:00v_mldb_node0001v_mldb_node0001-123346:0xf2be5b45035996273704962release4503599627691203411272958QUERYverticapy_json191466
❌
-2739771977645684132
862024-10-31 11:40:04.188521-04:00v_mldb_node0001v_mldb_node0001-123346:0xf2be5b45035996273704962release4503599627691203411372959QUERY191466
❌
-7383708702660407858
872024-10-31 11:40:04.291514-04:00v_mldb_node0001v_mldb_node0001-123346:0xf2be5b45035996273704962release4503599627691203411472960QUERY_version191466
❌
8903476768692993780
882024-10-31 11:40:04.395484-04:00v_mldb_node0001v_mldb_node0001-123346:0xf2be5b45035996273704962release4503599627691203411572961QUERY191466
❌
-1608247381113320213
892024-10-31 11:40:04.496551-04:00v_mldb_node0001v_mldb_node0001-123346:0xf2be5b45035996273704962release4503599627691203411672962QUERY_version191466
❌
8903476768692993780
902024-10-31 11:40:04.641235-04:00v_mldb_node0001v_mldb_node0001-123346:0xf2be5b45035996273704962release4503599627691203411772963QUERY191466
❌
-1608247381113320213
912024-10-31 11:40:04.786700-04:00v_mldb_node0001v_mldb_node0001-123346:0xf2be5b45035996273704962release4503599627691203411872964QUERYverticapy_json191466
❌
-2739771977645684132
922024-10-31 11:40:04.892481-04:00v_mldb_node0001v_mldb_node0001-123346:0xf2be5b45035996273704962release4503599627691203411972965QUERYverticapy_json191466
❌
-2739771977645684132
932024-10-31 11:40:05.003042-04:00v_mldb_node0001v_mldb_node0001-123346:0xf2be5b45035996273704962release4503599627691203412072966QUERY191466
❌
-5027268506192616290
942024-10-31 11:40:05.110443-04:00v_mldb_node0001v_mldb_node0001-123346:0xf2be5b45035996273704962release4503599627691203412172967QUERYverticapy_json191466
❌
-2739771977645684132
952024-10-31 11:40:05.214704-04:00v_mldb_node0001v_mldb_node0001-123346:0xf2be5b45035996273704962release4503599627691203412272968QUERY191466
❌
2586552547480450508
962024-10-31 11:40:05.317302-04:00v_mldb_node0001v_mldb_node0001-123346:0xf2be5b45035996273704962release4503599627691203412372969QUERYverticapy_json191466
❌
-2739771977645684132
972024-10-31 11:40:05.418442-04:00v_mldb_node0001v_mldb_node0001-123346:0xf2be5b45035996273704962release4503599627691203412472970QUERYverticapy_json191466
❌
-2739771977645684132
982024-10-31 11:40:05.522808-04:00v_mldb_node0001v_mldb_node0001-123346:0xf2be5b45035996273704962release4503599627691203412572971QUERY191466
❌
-3237197799321656504
992024-10-31 11:40:05.626419-04:00v_mldb_node0001v_mldb_node0001-123346:0xf2be5b45035996273704962release4503599627691203412672972QUERYverticapy_json191466
❌
-2739771977645684132
1002024-10-31 11:40:05.730480-04:00v_mldb_node0001v_mldb_node0001-123346:0xf2be5b45035996273704962release4503599627691203412772973QUERYverticapy_json191466
❌
-2739771977645684132
Rows: 1-100 | Columns: 16

Note

You can use the method without parameters to obtain a list of all available tables.

qprof.get_table()
Out[8]: 
['dc_requests_issued',
 'dc_explain_plans',
 'dc_query_executions',
 'dc_plan_activities',
 'dc_scan_events',
 'dc_slow_events',
 'execution_engine_profiles',
 'host_resources',
 'query_events',
 'query_plan_profiles',
 'query_profiles',
 'projection_storage',
 'projection_usage',
 'resource_pool_status',
 'storage_containers',
 'dc_lock_attempts',
 'dc_plan_resources',
 'configuration_parameters',
 'query_consumption',
 'projections',
 'projection_columns',
 'resource_acquisitions',
 'resource_pools']

We can also look at all the object queries information:

qprof.get_queries()
010
is_current
Boolean
123
transaction_id
Integer
123
statement_id
Integer
Abc
request_label
Varchar
Abc
Varchar(179)
123
qduration
Numeric(9)
📅
start_timestamp
Timestamp(29)
📅
end_timestamp
Timestamp(29)
0
✅
4503599627691396035.1021542024-10-31 11:42:24.5155892024-10-31 11:42:29.595475
Rows: 1-1 | Columns: 9

Executing a QPROF step

Numerous QPROF steps are accessible by directly using the corresponding methods. For instance, step 0 corresponds to the Vertica version, which can be executed using the associated method get_version.

qprof.get_version()
Out[9]: (24, 3, 0, 20240423)

Note

To explore all available methods, please refer to the ‘Methods’ section. For additional information, you can also utilize the help function.

It is possible to access the same step by using the step method.

qprof.step(idx = 0)
Out[10]: (24, 3, 0, 20240423)

Note

By changing the idx value above, you can check out all the steps of the QueryProfiler.

SQL Query

SQL query can be conveniently reproduced in a color formatted version:

qprof.get_request()

Query Performance Details

Query Execution Time

To get the execution time of the entire query:

qprof.get_qduration(unit="s")
Out[11]: 5.102154

Note

You can change the unit to “m” to get the result in minutes.

Query Execution Time Plots

To get the time breakdown of all the steps in a graphical output, we can call the get_qsteps attribute.

qprof.get_qsteps(kind="bar")
Loading....

Note

The same plot can also be plotted using a bar plot by setting kind='bar'.

Note

For charts, it is possible to pass many parameters to customize them. Example: You can use categoryorder to sort the chart or width and height to manage the size.

Query Plan

To get the entire query plan:

qprof.get_qplan()
+-SELECT  LIMIT 10 [Cost: 62K, Rows: 10 (NO STATISTICS)] (PATH ID: 0)
|  Output Only: 10 tuples
|  Execute on: Query Initiator
| +---> SORT [TOPK] [Cost: 62K, Rows: 10K (NO STATISTICS)] (PATH ID: 1)
| |      Order: query_requests.request_duration DESC
| |      Output Only: 10 tuples
| |      Execute on: All Nodes
| |      Execute on: All Nodes
| | +---> JOIN HASH [LeftOuter] [Cost: 2K, Rows: 10K (NO STATISTICS)] (PATH ID: 3)
| | |      Join Cond: (ri.node_name = dc_requests_completed.node_name) AND (ri.session_id = dc_requests_completed.session_id) AND (ri.request_id = dc_requests_completed.request_id)
| | |      Materialize at Output: ri."time", ri.transaction_id, ri.statement_id, ri.request
| | |      Execute on: All Nodes
| | | +-- Outer -> STORAGE ACCESS for ri [Cost: 649, Rows: 10K (NO STATISTICS)] (PATH ID: 4)
| | | |      Projection: v_internal.dc_requests_issued_p
| | | |      Materialize: ri.node_name, ri.session_id, ri.request_id
| | | |      Filter: (ri."time" > '2024-10-31 10:42:24.287859-04'::timestamptz)
| | | |      Execute on: All Nodes
| | | +-- Inner -> STORAGE ACCESS for dc_requests_completed [Cost: 965, Rows: 10K (NO STATISTICS)] (PATH ID: 5)
| | | |      Projection: v_internal.dc_requests_completed_p
| | | |      Materialize: dc_requests_completed.request_id, dc_requests_completed."time", dc_requests_completed.node_name, dc_requests_completed.session_id
| | | |      Filter: (dc_requests_completed.node_name IS NOT NULL)
| | | |      Filter: (dc_requests_completed.session_id IS NOT NULL)
| | | |      Filter: (dc_requests_completed.request_id IS NOT NULL)
| | | |      Execute on: All Nodes
Out[12]: '+-SELECT  LIMIT 10 [Cost: 62K, Rows: 10 (NO STATISTICS)] (PATH ID: 0)\n|  Output Only: 10 tuples\n|  Execute on: Query Initiator\n| +---> SORT [TOPK] [Cost: 62K, Rows: 10K (NO STATISTICS)] (PATH ID: 1)\n| |      Order: query_requests.request_duration DESC\n| |      Output Only: 10 tuples\n| |      Execute on: All Nodes\n| |      Execute on: All Nodes\n| | +---> JOIN HASH [LeftOuter] [Cost: 2K, Rows: 10K (NO STATISTICS)] (PATH ID: 3)\n| | |      Join Cond: (ri.node_name = dc_requests_completed.node_name) AND (ri.session_id = dc_requests_completed.session_id) AND (ri.request_id = dc_requests_completed.request_id)\n| | |      Materialize at Output: ri."time", ri.transaction_id, ri.statement_id, ri.request\n| | |      Execute on: All Nodes\n| | | +-- Outer -> STORAGE ACCESS for ri [Cost: 649, Rows: 10K (NO STATISTICS)] (PATH ID: 4)\n| | | |      Projection: v_internal.dc_requests_issued_p\n| | | |      Materialize: ri.node_name, ri.session_id, ri.request_id\n| | | |      Filter: (ri."time" > \'2024-10-31 10:42:24.287859-04\'::timestamptz)\n| | | |      Execute on: All Nodes\n| | | +-- Inner -> STORAGE ACCESS for dc_requests_completed [Cost: 965, Rows: 10K (NO STATISTICS)] (PATH ID: 5)\n| | | |      Projection: v_internal.dc_requests_completed_p\n| | | |      Materialize: dc_requests_completed.request_id, dc_requests_completed."time", dc_requests_completed.node_name, dc_requests_completed.session_id\n| | | |      Filter: (dc_requests_completed.node_name IS NOT NULL)\n| | | |      Filter: (dc_requests_completed.session_id IS NOT NULL)\n| | | |      Filter: (dc_requests_completed.request_id IS NOT NULL)\n| | | |      Execute on: All Nodes'

Query Plan Tree

We can easily call the function to get the query plan Graphviz:

qprof.get_qplan_tree(return_graphviz = True)
Out[13]: 'digraph Tree {\n\tgraph [bgcolor="#FFFFFFDD"]\n\tnode [shape=plaintext, fillcolor=white]\tedge [color="#000000", style=solid];\n\tlegend_annotations [shape=plaintext, fillcolor=white, label=<<table border="0" cellborder="1" cellspacing="0"><tr><td BGCOLOR="#FFFFFFDD"></td><td BGCOLOR="#DFDFDF"><FONT COLOR="#000000">Path transitions</FONT></td></tr><tr><td BGCOLOR="#DFDFDF"><FONT COLOR="#000000">I</FONT></td><td BGCOLOR="#FFFFFFDD"><FONT COLOR="#000000">INNER</FONT></td></tr><tr><td BGCOLOR="#DFDFDF"><FONT COLOR="#000000">O</FONT></td><td BGCOLOR="#FFFFFFDD"><FONT COLOR="#000000">OUTER</FONT></td></tr><tr><td BGCOLOR="#FFFFFFDD"></td><td BGCOLOR="#DFDFDF"><FONT COLOR="#000000">Links</FONT></td></tr><tr><td BGCOLOR="#DFDFDF"><FONT COLOR="#000000">___</FONT></td><td BGCOLOR="#FFFFFFDD"><FONT COLOR="#000000">LOCAL</FONT></td></tr><tr><td BGCOLOR="#FFFFFFDD"></td><td BGCOLOR="#DFDFDF"><FONT COLOR="#000000">Information</FONT></td></tr><tr><td BGCOLOR="#DFDFDF"><FONT COLOR="#000000">🚫</FONT></td><td BGCOLOR="#FFFFFFDD"><FONT COLOR="#000000">NO STATISTICS</FONT></td></tr><tr><td BGCOLOR="#DFDFDF"><FONT COLOR="#000000">🟢</FONT></td><td BGCOLOR="#FFFFFFDD"><FONT COLOR="#000000">QUERY INITIATOR</FONT></td></tr><tr><td BGCOLOR="#DFDFDF"><FONT COLOR="#000000">🌐</FONT></td><td BGCOLOR="#FFFFFFDD"><FONT COLOR="#000000">ALL NODES</FONT></td></tr></table>>]\n\n\n\tlegend0 [shape=plaintext, fillcolor=white, label=<<table border="0" cellborder="1" cellspacing="0"><tr><td BGCOLOR="#DFDFDF"><FONT COLOR="#000000">Execution time in µs</FONT></td></tr><tr><td BGCOLOR="#00FF00"><FONT COLOR="#000000">56</FONT></td></tr><tr><td BGCOLOR="#3FBF00"><FONT COLOR="#000000">658</FONT></td></tr><tr><td BGCOLOR="#7F7F00"><FONT COLOR="#000000">8K</FONT></td></tr><tr><td BGCOLOR="#BF3F00"><FONT COLOR="#000000">88K</FONT></td></tr><tr><td BGCOLOR="#FF0000"><FONT COLOR="#000000">1M</FONT></td></tr></table>>]\n\n\tlegend1 [shape=plaintext, fillcolor=white, label=<<table border="0" cellborder="1" cellspacing="0"><tr><td BGCOLOR="#DFDFDF"><FONT COLOR="#000000">Produced row count</FONT></td></tr><tr><td BGCOLOR="#00FF00"><FONT COLOR="#000000">10</FONT></td></tr><tr><td BGCOLOR="#3FBF00"><FONT COLOR="#000000">173</FONT></td></tr><tr><td BGCOLOR="#7F7F00"><FONT COLOR="#000000">3K</FONT></td></tr><tr><td BGCOLOR="#BF3F00"><FONT COLOR="#000000">44K</FONT></td></tr><tr><td BGCOLOR="#FF0000"><FONT COLOR="#000000">694K</FONT></td></tr></table>>]\n\n\t0 [width=1.22, height=1.22, tooltip="SELECT  LIMIT 10 [Cost: 62K, Rows: 10 (NO STATISTICS)] (PATH ID: 0)\n * Execution time in µs: 56\n * Produced row count: 10\n\nAggregated metrics:\n---------------------\n\n - Number of threads: 1\n - Execution time in µs: 56\n - Processed row count: NULL\n - Produced row count: 10\n - Clock time in µs: 59\n - Reserved memory size in B: 130,932\n - Allocated memory size in B: NULL\n\nMetrics per operator\n---------------------\n\nTopK:\n - Number of threads: 1\n - Execution time in µs: 56\n - Processed row count: NULL\n - Produced row count: 10\n - Clock time in µs: 59\n - Reserved memory size in B: 128,064\n - Allocated memory size in B: NULL\n\nExprEval:\n - Number of threads: 1\n - Execution time in µs: 40\n - Processed row count: NULL\n - Produced row count: 10\n - Clock time in µs: 39\n - Reserved memory size in B: 130,932\n - Allocated memory size in B: NULL\n\nDescriptors\n------------\n\nOutput Only: 10 tuples\n\nExecute on: Query Initiator", fixedsize=true, URL="#path_id=0", xlabel="🚫 🟢", label=<<TABLE border="1" cellborder="1" cellspacing="0" cellpadding="0"><TR><TD WIDTH="18.0" HEIGHT="36.0" BGCOLOR="#00FF00" ><FONT COLOR="#00FF00">.</FONT></TD><TD WIDTH="18.0" HEIGHT="36.0" BGCOLOR="#FFFFFFDD"><FONT POINT-SIZE="22.0" COLOR="#000000">0</FONT></TD><TD WIDTH="18.0" HEIGHT="36.0" BGCOLOR="#FFFFFFDD"><FONT POINT-SIZE="22.0" COLOR="#000000">🔍</FONT></TD><TD WIDTH="18.0" HEIGHT="36.0" BGCOLOR="#00FF00"><FONT COLOR="#00FF00">.</FONT></TD></TR></TABLE>>];\n\t1 [width=1.22, height=1.22, tooltip="SORT [TOPK] [Cost: 62K, Rows: 10K (NO STATISTICS)] (PATH ID: 1)\n * Execution time in µs: 112,161\n * Produced row count: 31,455\n\nAggregated metrics:\n---------------------\n\n - Number of threads: 4\n - Execution time in µs: 112,161\n - Processed row count: NULL\n - Produced row count: 31,455\n - Clock time in µs: 111,958\n - Reserved memory size in B: 21,741,048\n - Allocated memory size in B: NULL\n\nMetrics per operator\n---------------------\n\nNetworkRecv:\n - Number of threads: 4\n - Execution time in µs: 380\n - Processed row count: NULL\n - Produced row count: 10\n - Clock time in µs: NULL\n - Reserved memory size in B: 21,741,048\n - Allocated memory size in B: NULL\n\nNetworkSend:\n - Number of threads: 1\n - Execution time in µs: 67\n - Processed row count: NULL\n - Produced row count: 10\n - Clock time in µs: NULL\n - Reserved memory size in B: 8,789,832\n - Allocated memory size in B: NULL\n\nTopK:\n - Number of threads: 2\n - Execution time in µs: 68,538\n - Processed row count: NULL\n - Produced row count: 10\n - Clock time in µs: 47,911\n - Reserved memory size in B: 768,392\n - Allocated memory size in B: NULL\n\nExprEval:\n - Number of threads: 1\n - Execution time in µs: 112,161\n - Processed row count: NULL\n - Produced row count: 31,455\n - Clock time in µs: 111,958\n - Reserved memory size in B: 130,932\n - Allocated memory size in B: NULL\n\nDescriptors\n------------\n\nOrder: query_requests.request_duration DESC\n\nOutput Only: 10 tuples\n\nExecute on: All Nodes\n\nExecute on: All Nodes", fixedsize=true, URL="#path_id=1", xlabel="🚫 🌐", label=<<TABLE border="1" cellborder="1" cellspacing="0" cellpadding="0"><TR><TD WIDTH="18.0" HEIGHT="36.0" BGCOLOR="#C53900" ><FONT COLOR="#C53900">.</FONT></TD><TD WIDTH="18.0" HEIGHT="36.0" BGCOLOR="#FFFFFFDD"><FONT POINT-SIZE="22.0" COLOR="#000000">1</FONT></TD><TD WIDTH="18.0" HEIGHT="36.0" BGCOLOR="#FFFFFFDD"><FONT POINT-SIZE="22.0" COLOR="#000000">🔀</FONT></TD><TD WIDTH="18.0" HEIGHT="36.0" BGCOLOR="#B74700"><FONT COLOR="#B74700">.</FONT></TD></TR></TABLE>>];\n\t3 [width=1.22, height=1.22, tooltip="JOIN HASH [LeftOuter] [Cost: 2K, Rows: 10K (NO STATISTICS)] (PATH ID: 3)\n * Execution time in µs: 1,024,494\n * Produced row count: 31,455\n\nAggregated metrics:\n---------------------\n\n - Number of threads: 2\n - Execution time in µs: 1,024,494\n - Processed row count: NULL\n - Produced row count: 31,455\n - Clock time in µs: 1,442,725\n - Reserved memory size in B: 26,462,208\n - Allocated memory size in B: NULL\n\nMetrics per operator\n---------------------\n\nStorageUnion:\n - Number of threads: 1\n - Execution time in µs: 307,978\n - Processed row count: NULL\n - Produced row count: 31,455\n - Clock time in µs: NULL\n - Reserved memory size in B: 8,385,604\n - Allocated memory size in B: NULL\n\nJoin:\n - Number of threads: 2\n - Execution time in µs: 1,024,494\n - Processed row count: NULL\n - Produced row count: 31,455\n - Clock time in µs: 1,442,725\n - Reserved memory size in B: 26,462,208\n - Allocated memory size in B: NULL\n\nDescriptors\n------------\n\nJoin Cond: (ri.node_name = dc_requests_completed.node_name) AND (ri.session_id = dc_requests_completed.session_id) AND (ri.request_id = dc_requests_completed.request_id)\n\nMaterialize at Output: ri.\'time\', ri.transaction_id, ri.statement_id, ri.request\n\nExecute on: All Nodes", fixedsize=true, URL="#path_id=3", xlabel="🚫 🌐", label=<<TABLE border="1" cellborder="1" cellspacing="0" cellpadding="0"><TR><TD WIDTH="18.0" HEIGHT="36.0" BGCOLOR="#FF0000" ><FONT COLOR="#FF0000">.</FONT></TD><TD WIDTH="18.0" HEIGHT="36.0" BGCOLOR="#FFFFFFDD"><FONT POINT-SIZE="22.0" COLOR="#000000">3</FONT></TD><TD WIDTH="18.0" HEIGHT="36.0" BGCOLOR="#FFFFFFDD"><FONT POINT-SIZE="22.0" COLOR="#000000">🔗</FONT></TD><TD WIDTH="18.0" HEIGHT="36.0" BGCOLOR="#B74700"><FONT COLOR="#B74700">.</FONT></TD></TR></TABLE>>];\n\t4 [width=1.22, height=1.22, tooltip="Outer -> STORAGE ACCESS for ri [Cost: 649, Rows: 10K (NO STATISTICS)] (PATH ID: 4)\n * Execution time in µs: 5,941\n * Produced row count: 31,455\n\nAggregated metrics:\n---------------------\n\n - Number of threads: 1\n - Execution time in µs: 5,941\n - Processed row count: 35,014\n - Produced row count: 31,455\n - Clock time in µs: 6,331\n - Reserved memory size in B: 135,392\n - Allocated memory size in B: NULL\n\nMetrics per operator\n---------------------\n\nScan:\n - Number of threads: 1\n - Execution time in µs: 5,941\n - Processed row count: 35,014\n - Produced row count: 31,455\n - Clock time in µs: 6,331\n - Reserved memory size in B: 135,392\n - Allocated memory size in B: NULL\n\nDescriptors\n------------\n\nProjection: v_internal.dc_requests_issued_p\n\nMaterialize: ri.node_name, ri.session_id, ri.request_id\n\nFilter: (ri.\'time\' > \'2024-10-31 10:42:24.287859-04\'::timestamptz)\n\nExecute on: All Nodes", fixedsize=true, URL="#path_id=4", xlabel="🚫 🌐", label=<<TABLE border="1" cellborder="1" cellspacing="0" cellpadding="0"><TR><TD WIDTH="18.0" HEIGHT="36.0" BGCOLOR="#788600" ><FONT COLOR="#788600">.</FONT></TD><TD WIDTH="18.0" HEIGHT="36.0" BGCOLOR="#FFFFFFDD"><FONT POINT-SIZE="22.0" COLOR="#000000">4</FONT></TD><TD WIDTH="18.0" HEIGHT="36.0" BGCOLOR="#FFFFFFDD"><FONT POINT-SIZE="22.0" COLOR="#000000">🗄️</FONT></TD><TD WIDTH="18.0" HEIGHT="36.0" BGCOLOR="#B74700"><FONT COLOR="#B74700">.</FONT></TD></TR><TR><TD COLSPAN="4" WIDTH="18.0" HEIGHT="36.0" BGCOLOR="#FFFFFFDD" ><FONT POINT-SIZE="9.0" COLOR="#000000">v_interna..</FONT></TD></TR></TABLE>>];\n\t5 [width=1.22, height=1.22, tooltip="Inner -> STORAGE ACCESS for dc_requests_completed [Cost: 965, Rows: 10K (NO STATISTICS)] (PATH ID: 5)\n * Execution time in µs: 377,946\n * Produced row count: 694,456\n\nAggregated metrics:\n---------------------\n\n - Number of threads: 1\n - Execution time in µs: 377,946\n - Processed row count: 694,456\n - Produced row count: 694,456\n - Clock time in µs: 199,835\n - Reserved memory size in B: 4,737,028\n - Allocated memory size in B: NULL\n\nMetrics per operator\n---------------------\n\nStorageUnion:\n - Number of threads: 1\n - Execution time in µs: 377,946\n - Processed row count: NULL\n - Produced row count: 694,456\n - Clock time in µs: NULL\n - Reserved memory size in B: 4,737,028\n - Allocated memory size in B: NULL\n\nScan:\n - Number of threads: 1\n - Execution time in µs: 183,262\n - Processed row count: 694,456\n - Produced row count: 694,456\n - Clock time in µs: 199,835\n - Reserved memory size in B: 141,024\n - Allocated memory size in B: NULL\n\nDescriptors\n------------\n\nProjection: v_internal.dc_requests_completed_p\n\nMaterialize: dc_requests_completed.request_id, dc_requests_completed.\'time\', dc_requests_completed.node_name, dc_requests_completed.session_id\n\nFilter: (dc_requests_completed.node_name IS NOT NULL)\n\nFilter: (dc_requests_completed.session_id IS NOT NULL)\n\nFilter: (dc_requests_completed.request_id IS NOT NULL)\n\nExecute on: All Nodes", fixedsize=true, URL="#path_id=5", xlabel="🚫 🌐", label=<<TABLE border="1" cellborder="1" cellspacing="0" cellpadding="0"><TR><TD WIDTH="18.0" HEIGHT="36.0" BGCOLOR="#E51900" ><FONT COLOR="#E51900">.</FONT></TD><TD WIDTH="18.0" HEIGHT="36.0" BGCOLOR="#FFFFFFDD"><FONT POINT-SIZE="22.0" COLOR="#000000">5</FONT></TD><TD WIDTH="18.0" HEIGHT="36.0" BGCOLOR="#FFFFFFDD"><FONT POINT-SIZE="22.0" COLOR="#000000">🗄️</FONT></TD><TD WIDTH="18.0" HEIGHT="36.0" BGCOLOR="#FF0000"><FONT COLOR="#FF0000">.</FONT></TD></TR><TR><TD COLSPAN="4" WIDTH="18.0" HEIGHT="36.0" BGCOLOR="#FFFFFFDD" ><FONT POINT-SIZE="9.0" COLOR="#000000">v_interna..</FONT></TD></TR></TABLE>>];\n\n\t0 -> 1 [dir=back, label="  ", style=solid, fontcolor="#000000"];\n\t1 -> 3 [dir=back, label="  ", style=solid, fontcolor="#000000"];\n\t3 -> 4 [dir=back, label=" O ", style=solid, fontcolor="#000000"];\n\t3 -> 5 [dir=back, label=" I-H ", style=solid, fontcolor="#000000"];\n\n}'

We can conveniently get the Query Plan tree:

qprof.get_qplan_tree()
../_images/performance_vertica_qprof_QueryProfiler_get_qplan_tree.png

We can easily customize the tree:

qprof.get_qplan_tree(
    metric='cost',
    shape='square',
    color_low='#0000FF',
    color_high='#FFC0CB',
)
Tree legend_annotations Path transitions I INNER O OUTER Links ___ LOCAL Information 🚫 NO STATISTICS 🟢 QUERY INITIATOR 🌐 ALL NODES legend0 Query plan cost 648 2K 6K 20K 62K 0 . 0 🔍 🚫 🟢 1 . 1 🔀 🚫 🌐 0->1   3 . 3 🔗 🚫 🌐 1->3   4 . 4 🗄️ v_interna.. 🚫 🌐 3->4 O 5 . 5 🗄️ v_interna.. 🚫 🌐 3->5 I-H

We can look at a specific path ID, and look at some specific paths information:

qprof.get_qplan_tree(
    path_id=1,
    path_id_info=[1, 3],
    metric='cost',
    shape='square',
    color_low='#0000FF',
    color_high='#FFC0CB',
)
Tree legend_annotations Path transitions I INNER O OUTER Links ___ LOCAL Information 🚫 NO STATISTICS 🟢 QUERY INITIATOR 🌐 ALL NODES legend0 Query plan cost 648 2K 6K 20K 62K 0 . 0 🔍 🚫 🟢 1 . 1 🔀 🚫 🌐 0->1   3 . 3 🔗 🚫 🌐 1->3   7 SORT [TOPK] [Cost: 62K, Rows: 10K (NO STATISTICS)] (PATH ID: 1)  Order: query_requests.requ est_duration DESC  Output Only: 10 tuples  Execute on: All Nodes  Execute on: All Nodes  Aggregated metrics: ---------------------   - Number of threads: 4  - Execution time in µs: 112,161 - Processed row count: NULL  - Produced row count: 31,455  - Clock time in µs: 111,958  - Reserved memory size in B: 21,741,048  - Allocated memory size in B: NULL  Metrics per operator --------------------- NetworkRecv:  - Number of threads: 4  - Execution time in µs: 380  - Processed row count: NULL  - Produced row count: 10  - Clock time in µs: NULL  - Reserved memory size in B: 21,741,048  - Allocated memory size in B: NULL NetworkSend:  - Number of threads: 1  - Execution time in µs: 67  - Processed row count: NULL  - Produced row count: 10  - Clock time in µs: NULL  - Reserved memory size in B: 8,789,832  - Allocated memory size in B: NULL  TopK: - Number of threads: 2  - Execution time in µs: 68,538 - Processed row count: NULL  - Produced row count: 10  - Clock time in µs: 47,911  - Reserved memory size in B: 768,392  - Allocated memory size in B: NULL  ExprEval:  - Number of threads: 1  - Execution time in µs: 112,161 - Processed row count: NULL  - Produced row count: 31,455  - Clock time in µs: 111,958  - Reserved memory size in B: 130,932  - Allocated memory size in B: NULL 7->1 4 . 4 🗄️ v_interna.. 🚫 🌐 3->4 O 5 . 5 🗄️ v_interna.. 🚫 🌐 3->5 I-H 9 JOIN HASH [LeftOuter] [Cost: 2K, Rows: 10K (NO STATISTICS)] (PATH ID: 3)  Join Cond: (ri.node_name = dc_requests_co mpleted.node_name) AND (ri.session_id = dc_requests_c ompleted.session_id) AND (ri.request_id = dc_requests_c ompleted.request_id) Materialize at Output: ri.'time', ri.transaction_id, ri.statement_id, ri.request Execute on: All Nodes Aggregated metrics: ---------------------   - Number of threads: 2  - Execution time in µs: 1,024,494  - Processed row count: NULL  - Produced row count: 31,455  - Clock time in µs: 1,442,725  - Reserved memory size in B: 26,462,208 - Allocated memory size in B: NULL  Metrics per operator --------------------- StorageUnion:  - Number of threads: 1  - Execution time in µs: 307,978  - Processed row count: NULL  - Produced row count: 31,455  - Clock time in µs: NULL  - Reserved memory size in B: 8,385,604  - Allocated memory size in B: NULL  Join:  - Number of threads: 2  - Execution time in µs: 1,024,494  - Processed row count: NULL  - Produced row count: 31,455  - Clock time in µs: 1,442,725  - Reserved memory size in B: 26,462,208  - Allocated memory size in B: NULL 9->3

Query Plan Profile

To visualize the time consumption of query profile plan:

qprof.get_qplan_profile(kind = "pie")

Note

The same plot can also be plotted using a bar plot by switching the kind to “bar”.

Query Events

We can easily look at the query events:

qprof.get_query_events()
📅
event_timestamp
Timestamptz(35)
Abc
node_name
Varchar(128)
Abc
event_category
Varchar(12)
Abc
event_type
Varchar(64000)
Abc
Varchar(64000)
Abc
operator_name
Varchar(128)
123
path_id
Integer
Abc
Varchar(64000)
Abc
suggested_action
Varchar(64000)
12024-10-31 11:42:24.515966-04:00v_mldb_node0002EXECUTIONEE_COMPILE_MEMORY_ALLOC[null][null]
22024-10-31 11:42:24.543806-04:00v_mldb_node0002EXECUTIONRUNTIME_PREDICATE_EVAL_ORDERScan5
32024-10-31 11:42:24.519233-04:00v_mldb_node0004EXECUTIONEE_COMPILE_MEMORY_ALLOC[null][null]
42024-10-31 11:42:24.546973-04:00v_mldb_node0004EXECUTIONRUNTIME_PREDICATE_EVAL_ORDERScan5
52024-10-31 11:42:24.521130-04:00v_mldb_node0003EXECUTIONEE_COMPILE_MEMORY_ALLOC[null][null]
62024-10-31 11:42:24.546278-04:00v_mldb_node0003EXECUTIONRUNTIME_PREDICATE_EVAL_ORDERScan5
Rows: 1-6 | Columns: 9

CPU Time by Node and Path ID

Another very important metric could be the CPU time spent by each node. This can be visualized by:

qprof.get_cpu_time(kind="bar")

In order to get the results in a tabular form, just switch the show option to False.

qprof.get_cpu_time(show=False)
Abc
node_name
Varchar(128)
Abc
path_id
Varchar(20)
123
counter_value
Integer
1v_mldb_node0004-120
2v_mldb_node0004117
3v_mldb_node0004130
4v_mldb_node0004112
5v_mldb_node0004355
6v_mldb_node0004212
7v_mldb_node00043127
8v_mldb_node0004414
9v_mldb_node0004564
10v_mldb_node0004510
11v_mldb_node0001-195
12v_mldb_node0001-1227
13v_mldb_node0001056
14v_mldb_node0001040
15v_mldb_node00011380
16v_mldb_node0001167
17v_mldb_node0001168538
18v_mldb_node00011112161
19v_mldb_node00013307978
20v_mldb_node00012220365
21v_mldb_node000131024494
22v_mldb_node000145941
23v_mldb_node00015377946
24v_mldb_node00015183262
25v_mldb_node0002-119
26v_mldb_node0002117
27v_mldb_node0002134
28v_mldb_node0002115
29v_mldb_node0002358
30v_mldb_node0002212
31v_mldb_node0002395
32v_mldb_node0002414
33v_mldb_node0002567
34v_mldb_node000259
35v_mldb_node0003-144
36v_mldb_node0003140
37v_mldb_node0003176
38v_mldb_node0003131
39v_mldb_node00033140
40v_mldb_node0003231
41v_mldb_node00033236
42v_mldb_node0003431
43v_mldb_node00035154
44v_mldb_node0003523
Rows: 1-44 | Columns: 3

Resource Acquisition Report

To obtain a comprehensive resource acquisition report, including specific details such as queue_wait_time, pool_name… utilize the following syntax:

qprof.get_resource_acquisition()
Abc
node_name
Varchar(128)
123
path_id
Integer
123
localplan_id
Integer
Abc
operator_name
Varchar(128)
123
thread_count
Integer
123
exec_time_us
Integer
123
est_rows
Integer
123
proc_rows
Integer
123
prod_rows
Integer
123
rle_prod_rows
Integer
123
cstall_us
Integer
123
pstall_us
Integer
123
clock_time_us
Integer
123
mem_res_b
Integer
123
mem_all_b
Integer
123
bytes_spilled
Integer
123
blocks_filtered_sip
Integer
123
blocks_analyzed_sip
Integer
123
container_rows_filtered_sip
Integer
123
container_rows_filtered_pred
Integer
123
container_rows_pruned_sip
Integer
123
container_rows_pruned_pred
Integer
123
container_rows_pruned_valindex
Integer
123
hash_tables_spilled_sort
Integer
123
join_inner_clock_time_us
Integer
123
join_inner_exec_time_us
Integer
123
join_outer_clock_time_us
Integer
123
join_outer_exec_time_us
Integer
123
network_wait_us
Integer
123
producer_stall_us
Integer
123
producer_wait_us
Integer
123
request_wait_us
Integer
123
response_wait_us
Integer
123
recv_net_time_us
Integer
123
recv_wait_us
Integer
123
rows_filtered_sip
Integer
123
rows_pruned_valindex
Integer
123
rows_processed_sip
Integer
123
total_rows_read_join_sort
Integer
123
total_rows_read_sort
Integer
1v_mldb_node0001-10Root195[null][null]10[null][null][null]1010[null][null][null][null][null][null][null][null][null][null][null][null][null][null][null][null][null][null][null][null][null][null][null][null][null][null]
2v_mldb_node000115NetworkSend1679999[null]101029419930[null]8397512[null]0[null][null][null][null][null][null][null][null][null][null][null][null]002942133[null][null][null][null][null][null][null][null][null]
3v_mldb_node000129ExprEval12203659999[null]3145531455[null][null]2218322180041[null][null][null][null][null][null][null][null][null][null][null][null][null][null][null][null][null][null][null][null][null][null][null][null][null][null]
4v_mldb_node0001512StorageUnion1377946[null][null]694456694456[null][null][null]4737028[null][null][null][null][null][null][null][null][null][null][null][null][null][null][null][null][null]0311460[null][null][null][null][null][null][null]
5v_mldb_node0001513Scan11832629997694456694456694456[null][null]199835141024[null][null][null][null][null][null][null][null][null][null][null][null][null][null][null][null][null][null][null][null][null][null]0[null][null][null]
6v_mldb_node000213ExprEval115[null][null]00[null][null]15130932[null][null][null][null][null][null][null][null][null][null][null][null][null][null][null][null][null][null][null][null][null][null][null][null][null][null]
7v_mldb_node000234StorageUnion158[null][null]00[null][null][null]8385604[null][null][null][null][null][null][null][null][null][null][null][null][null][null][null][null][null]0301[null][null][null][null][null][null][null]
8v_mldb_node000247Scan1149999000[null][null]15135392[null][null][null][null][null][null][null][null][null][null][null][null][null][null][null][null][null][null][null][null][null][null]0[null][null][null]
9v_mldb_node000259Scan199997000[null][null]10141024[null][null][null][null][null][null][null][null][null][null][null][null][null][null][null][null][null][null][null][null][null][null]0[null][null][null]
10v_mldb_node000312TopK1769999[null]00[null][null]77768392[null][null][null][null][null][null][null][null][null][null][null][null][null][null][null][null][null][null][null][null][null][null][null][null][null][null]
11v_mldb_node000334StorageUnion1140[null][null]00[null][null][null]8385604[null][null][null][null][null][null][null][null][null][null][null][null][null][null][null][null][null]0708[null][null][null][null][null][null][null]
12v_mldb_node000336Join22369999[null]00[null][null]23326462208[null][null][null][null][null][null][null][null][null][null]4443183945[null][null][null][null][null][null][null][null][null][null][null][null]
13v_mldb_node000458StorageUnion164[null][null]00[null][null][null]4737028[null][null][null][null][null][null][null][null][null][null][null][null][null][null][null][null][null]057[null][null][null][null][null][null][null]
14v_mldb_node000459Scan1109997000[null][null]10141024[null][null][null][null][null][null][null][null][null][null][null][null][null][null][null][null][null][null][null][null][null][null]0[null][null][null]
15v_mldb_node0001310Join210244949999[null]3145531455[null][null]144272526462208[null][null][null][null][null][null][null][null][null][null]186580412305381073209682117[null][null][null][null][null][null][null][null][null][null][null][null]
16v_mldb_node000211NetworkSend1179999[null]0020696300[null]8789832[null]0[null][null][null][null][null][null][null][null][null][null][null][null]00401[null][null][null][null][null][null][null][null][null]
17v_mldb_node000311NetworkSend1409999[null]0020691590[null]8789832[null]0[null][null][null][null][null][null][null][null][null][null][null][null]00940[null][null][null][null][null][null][null][null][null]
18v_mldb_node000313ExprEval131[null][null]00[null][null]31130932[null][null][null][null][null][null][null][null][null][null][null][null][null][null][null][null][null][null][null][null][null][null][null][null][null][null]
19v_mldb_node0004-10NewEENode120[null][null]00[null][null]180[null][null][null][null][null][null][null][null][null][null][null][null][null][null][null][null][null][null][null][null][null][null][null][null][null][null]
20v_mldb_node000411NetworkSend1179999[null]0020696470[null]8789832[null]0[null][null][null][null][null][null][null][null][null][null][null][null]00418[null][null][null][null][null][null][null][null][null]
21v_mldb_node000436Join21279999[null]00[null][null]12826462208[null][null][null][null][null][null][null][null][null][null]2201701519[null][null][null][null][null][null][null][null][null][null][null][null]
22v_mldb_node000447Scan1149999000[null][null]14135392[null][null][null][null][null][null][null][null][null][null][null][null][null][null][null][null][null][null][null][null][null][null]0[null][null][null]
23v_mldb_node0001-11NewEENode1227[null][null]1010[null][null]227393216[null][null][null][null][null][null][null][null][null][null][null][null][null][null][null][null][null][null][null][null][null][null][null][null][null][null]
24v_mldb_node000102TopK15610[null]1010[null][null]59128064[null][null][null][null][null][null][null][null][null][null][null][null][null][null][null][null][null][null][null][null][null][null][null][null][null][null]
25v_mldb_node000103ExprEval14010[null]1010[null][null]39130932[null][null][null][null][null][null][null][null][null][null][null][null][null][null][null][null][null][null][null][null][null][null][null][null][null][null]
26v_mldb_node000116TopK2685389999[null]1010[null][null]47911768392[null][null][null][null][null][null][null][null][null][null][null][null][null][null][null][null][null][null][null][null][null][null][null][null][null][null]
27v_mldb_node000117ExprEval1112161[null][null]3145531455[null][null]111958130932[null][null][null][null][null][null][null][null][null][null][null][null][null][null][null][null][null][null][null][null][null][null][null][null][null][null]
28v_mldb_node0002-10NewEENode119[null][null]00[null][null]190[null][null][null][null][null][null][null][null][null][null][null][null][null][null][null][null][null][null][null][null][null][null][null][null][null][null]
29v_mldb_node000236Join2959999[null]00[null][null]9826462208[null][null][null][null][null][null][null][null][null][null]2061421820[null][null][null][null][null][null][null][null][null][null][null][null]
30v_mldb_node000258StorageUnion167[null][null]00[null][null][null]4737028[null][null][null][null][null][null][null][null][null][null][null][null][null][null][null][null][null]067[null][null][null][null][null][null][null]
31v_mldb_node0003-10NewEENode144[null][null]00[null][null]440[null][null][null][null][null][null][null][null][null][null][null][null][null][null][null][null][null][null][null][null][null][null][null][null][null][null]
32v_mldb_node000325ExprEval1319999[null]00[null][null]322180041[null][null][null][null][null][null][null][null][null][null][null][null][null][null][null][null][null][null][null][null][null][null][null][null][null][null]
33v_mldb_node000347Scan1319999000[null][null]33135392[null][null][null][null][null][null][null][null][null][null][null][null][null][null][null][null][null][null][null][null][null][null]0[null][null][null]
34v_mldb_node000413ExprEval112[null][null]00[null][null]12130932[null][null][null][null][null][null][null][null][null][null][null][null][null][null][null][null][null][null][null][null][null][null][null][null][null][null]
35v_mldb_node000434StorageUnion155[null][null]00[null][null][null]8385604[null][null][null][null][null][null][null][null][null][null][null][null][null][null][null][null][null]0325[null][null][null][null][null][null][null]
36v_mldb_node000114NetworkRecv43809999[null]1010[null][null][null]21741048[null][null][null][null][null][null][null][null][null][null][null][null][null][null]737[null][null][null][null]0737[null][null][null][null][null]
37v_mldb_node000138StorageUnion1307978[null][null]3145531455[null][null][null]8385604[null][null][null][null][null][null][null][null][null][null][null][null][null][null][null][null][null]02574626[null][null][null][null][null][null][null]
38v_mldb_node0001411Scan159419999350143145531455[null][null]6331135392[null][null][null][null][null][null][null][null][null][null][null][null][null][null][null][null][null][null][null][null][null][null]0[null][null][null]
39v_mldb_node000212TopK1349999[null]00[null][null]34768392[null][null][null][null][null][null][null][null][null][null][null][null][null][null][null][null][null][null][null][null][null][null][null][null][null][null]
40v_mldb_node000225ExprEval1129999[null]00[null][null]122180041[null][null][null][null][null][null][null][null][null][null][null][null][null][null][null][null][null][null][null][null][null][null][null][null][null][null]
41v_mldb_node000358StorageUnion1154[null][null]00[null][null][null]4737028[null][null][null][null][null][null][null][null][null][null][null][null][null][null][null][null][null]0146[null][null][null][null][null][null][null]
42v_mldb_node000359Scan1239997000[null][null]25141024[null][null][null][null][null][null][null][null][null][null][null][null][null][null][null][null][null][null][null][null][null][null]0[null][null][null]
43v_mldb_node000412TopK1309999[null]00[null][null]31768392[null][null][null][null][null][null][null][null][null][null][null][null][null][null][null][null][null][null][null][null][null][null][null][null][null][null]
44v_mldb_node000425ExprEval1129999[null]00[null][null]112180041[null][null][null][null][null][null][null][null][null][null][null][null][null][null][null][null][null][null][null][null][null][null][null][null][null][null]
Rows: 1-44 | Columns: 40

Query Execution Report

To obtain a comprehensive performance report, including specific details such as which node executed each operation and the corresponding timing information, utilize the following syntax:

qprof.get_qexecution_report()
Abc
node_name
Varchar(128)
123
path_id
Integer
123
localplan_id
Integer
Abc
operator_name
Varchar(128)
123
thread_count
Integer
123
exec_time_us
Integer
123
est_rows
Integer
123
proc_rows
Integer
123
prod_rows
Integer
123
rle_prod_rows
Integer
123
cstall_us
Integer
123
pstall_us
Integer
123
clock_time_us
Integer
123
mem_res_b
Integer
123
mem_all_b
Integer
123
bytes_spilled
Integer
123
blocks_filtered_sip
Integer
123
blocks_analyzed_sip
Integer
123
container_rows_filtered_sip
Integer
123
container_rows_filtered_pred
Integer
123
container_rows_pruned_sip
Integer
123
container_rows_pruned_pred
Integer
123
container_rows_pruned_valindex
Integer
123
hash_tables_spilled_sort
Integer
123
join_inner_clock_time_us
Integer
123
join_inner_exec_time_us
Integer
123
join_outer_clock_time_us
Integer
123
join_outer_exec_time_us
Integer
123
network_wait_us
Integer
123
producer_stall_us
Integer
123
producer_wait_us
Integer
123
request_wait_us
Integer
123
response_wait_us
Integer
123
recv_net_time_us
Integer
123
recv_wait_us
Integer
123
rows_filtered_sip
Integer
123
rows_pruned_valindex
Integer
123
rows_processed_sip
Integer
123
total_rows_read_join_sort
Integer
123
total_rows_read_sort
Integer
1v_mldb_node0001310Join210244949999[null]3145531455[null][null]144272526462208[null][null][null][null][null][null][null][null][null][null]186580412305381073209682117[null][null][null][null][null][null][null][null][null][null][null][null]
2v_mldb_node000211NetworkSend1179999[null]0020696300[null]8789832[null]0[null][null][null][null][null][null][null][null][null][null][null][null]00401[null][null][null][null][null][null][null][null][null]
3v_mldb_node000311NetworkSend1409999[null]0020691590[null]8789832[null]0[null][null][null][null][null][null][null][null][null][null][null][null]00940[null][null][null][null][null][null][null][null][null]
4v_mldb_node000313ExprEval131[null][null]00[null][null]31130932[null][null][null][null][null][null][null][null][null][null][null][null][null][null][null][null][null][null][null][null][null][null][null][null][null][null]
5v_mldb_node0004-10NewEENode120[null][null]00[null][null]180[null][null][null][null][null][null][null][null][null][null][null][null][null][null][null][null][null][null][null][null][null][null][null][null][null][null]
6v_mldb_node000411NetworkSend1179999[null]0020696470[null]8789832[null]0[null][null][null][null][null][null][null][null][null][null][null][null]00418[null][null][null][null][null][null][null][null][null]
7v_mldb_node000436Join21279999[null]00[null][null]12826462208[null][null][null][null][null][null][null][null][null][null]2201701519[null][null][null][null][null][null][null][null][null][null][null][null]
8v_mldb_node000447Scan1149999000[null][null]14135392[null][null][null][null][null][null][null][null][null][null][null][null][null][null][null][null][null][null][null][null][null][null]0[null][null][null]
9v_mldb_node0001-10Root195[null][null]10[null][null][null]1010[null][null][null][null][null][null][null][null][null][null][null][null][null][null][null][null][null][null][null][null][null][null][null][null][null][null]
10v_mldb_node000115NetworkSend1679999[null]101029419930[null]8397512[null]0[null][null][null][null][null][null][null][null][null][null][null][null]002942133[null][null][null][null][null][null][null][null][null]
11v_mldb_node000129ExprEval12203659999[null]3145531455[null][null]2218322180041[null][null][null][null][null][null][null][null][null][null][null][null][null][null][null][null][null][null][null][null][null][null][null][null][null][null]
12v_mldb_node0001512StorageUnion1377946[null][null]694456694456[null][null][null]4737028[null][null][null][null][null][null][null][null][null][null][null][null][null][null][null][null][null]0311460[null][null][null][null][null][null][null]
13v_mldb_node0001513Scan11832629997694456694456694456[null][null]199835141024[null][null][null][null][null][null][null][null][null][null][null][null][null][null][null][null][null][null][null][null][null][null]0[null][null][null]
14v_mldb_node000213ExprEval115[null][null]00[null][null]15130932[null][null][null][null][null][null][null][null][null][null][null][null][null][null][null][null][null][null][null][null][null][null][null][null][null][null]
15v_mldb_node000234StorageUnion158[null][null]00[null][null][null]8385604[null][null][null][null][null][null][null][null][null][null][null][null][null][null][null][null][null]0301[null][null][null][null][null][null][null]
16v_mldb_node000247Scan1149999000[null][null]15135392[null][null][null][null][null][null][null][null][null][null][null][null][null][null][null][null][null][null][null][null][null][null]0[null][null][null]
17v_mldb_node000259Scan199997000[null][null]10141024[null][null][null][null][null][null][null][null][null][null][null][null][null][null][null][null][null][null][null][null][null][null]0[null][null][null]
18v_mldb_node000312TopK1769999[null]00[null][null]77768392[null][null][null][null][null][null][null][null][null][null][null][null][null][null][null][null][null][null][null][null][null][null][null][null][null][null]
19v_mldb_node000334StorageUnion1140[null][null]00[null][null][null]8385604[null][null][null][null][null][null][null][null][null][null][null][null][null][null][null][null][null]0708[null][null][null][null][null][null][null]
20v_mldb_node000336Join22369999[null]00[null][null]23326462208[null][null][null][null][null][null][null][null][null][null]4443183945[null][null][null][null][null][null][null][null][null][null][null][null]
21v_mldb_node000458StorageUnion164[null][null]00[null][null][null]4737028[null][null][null][null][null][null][null][null][null][null][null][null][null][null][null][null][null]057[null][null][null][null][null][null][null]
22v_mldb_node000459Scan1109997000[null][null]10141024[null][null][null][null][null][null][null][null][null][null][null][null][null][null][null][null][null][null][null][null][null][null]0[null][null][null]
23v_mldb_node000114NetworkRecv43809999[null]1010[null][null][null]21741048[null][null][null][null][null][null][null][null][null][null][null][null][null][null]737[null][null][null][null]0737[null][null][null][null][null]
24v_mldb_node000138StorageUnion1307978[null][null]3145531455[null][null][null]8385604[null][null][null][null][null][null][null][null][null][null][null][null][null][null][null][null][null]02574626[null][null][null][null][null][null][null]
25v_mldb_node0001411Scan159419999350143145531455[null][null]6331135392[null][null][null][null][null][null][null][null][null][null][null][null][null][null][null][null][null][null][null][null][null][null]0[null][null][null]
26v_mldb_node000212TopK1349999[null]00[null][null]34768392[null][null][null][null][null][null][null][null][null][null][null][null][null][null][null][null][null][null][null][null][null][null][null][null][null][null]
27v_mldb_node000225ExprEval1129999[null]00[null][null]122180041[null][null][null][null][null][null][null][null][null][null][null][null][null][null][null][null][null][null][null][null][null][null][null][null][null][null]
28v_mldb_node000358StorageUnion1154[null][null]00[null][null][null]4737028[null][null][null][null][null][null][null][null][null][null][null][null][null][null][null][null][null]0146[null][null][null][null][null][null][null]
29v_mldb_node000359Scan1239997000[null][null]25141024[null][null][null][null][null][null][null][null][null][null][null][null][null][null][null][null][null][null][null][null][null][null]0[null][null][null]
30v_mldb_node000412TopK1309999[null]00[null][null]31768392[null][null][null][null][null][null][null][null][null][null][null][null][null][null][null][null][null][null][null][null][null][null][null][null][null][null]
31v_mldb_node000425ExprEval1129999[null]00[null][null]112180041[null][null][null][null][null][null][null][null][null][null][null][null][null][null][null][null][null][null][null][null][null][null][null][null][null][null]
32v_mldb_node0001-11NewEENode1227[null][null]1010[null][null]227393216[null][null][null][null][null][null][null][null][null][null][null][null][null][null][null][null][null][null][null][null][null][null][null][null][null][null]
33v_mldb_node000102TopK15610[null]1010[null][null]59128064[null][null][null][null][null][null][null][null][null][null][null][null][null][null][null][null][null][null][null][null][null][null][null][null][null][null]
34v_mldb_node000103ExprEval14010[null]1010[null][null]39130932[null][null][null][null][null][null][null][null][null][null][null][null][null][null][null][null][null][null][null][null][null][null][null][null][null][null]
35v_mldb_node000116TopK2685389999[null]1010[null][null]47911768392[null][null][null][null][null][null][null][null][null][null][null][null][null][null][null][null][null][null][null][null][null][null][null][null][null][null]
36v_mldb_node000117ExprEval1112161[null][null]3145531455[null][null]111958130932[null][null][null][null][null][null][null][null][null][null][null][null][null][null][null][null][null][null][null][null][null][null][null][null][null][null]
37v_mldb_node0002-10NewEENode119[null][null]00[null][null]190[null][null][null][null][null][null][null][null][null][null][null][null][null][null][null][null][null][null][null][null][null][null][null][null][null][null]
38v_mldb_node000236Join2959999[null]00[null][null]9826462208[null][null][null][null][null][null][null][null][null][null]2061421820[null][null][null][null][null][null][null][null][null][null][null][null]
39v_mldb_node000258StorageUnion167[null][null]00[null][null][null]4737028[null][null][null][null][null][null][null][null][null][null][null][null][null][null][null][null][null]067[null][null][null][null][null][null][null]
40v_mldb_node0003-10NewEENode144[null][null]00[null][null]440[null][null][null][null][null][null][null][null][null][null][null][null][null][null][null][null][null][null][null][null][null][null][null][null][null][null]
41v_mldb_node000325ExprEval1319999[null]00[null][null]322180041[null][null][null][null][null][null][null][null][null][null][null][null][null][null][null][null][null][null][null][null][null][null][null][null][null][null]
42v_mldb_node000347Scan1319999000[null][null]33135392[null][null][null][null][null][null][null][null][null][null][null][null][null][null][null][null][null][null][null][null][null][null]0[null][null][null]
43v_mldb_node000413ExprEval112[null][null]00[null][null]12130932[null][null][null][null][null][null][null][null][null][null][null][null][null][null][null][null][null][null][null][null][null][null][null][null][null][null]
44v_mldb_node000434StorageUnion155[null][null]00[null][null][null]8385604[null][null][null][null][null][null][null][null][null][null][null][null][null][null][null][null][null]0325[null][null][null][null][null][null][null]
Rows: 1-44 | Columns: 40

Query Activity Time Report

To obtain a comprehensive report including Elapsed, exec_time and I/O by node, activity & path_id, utilize the following syntax:

qprof.get_activity_time()
Abc
node_name
Varchar(128)
123
path_id
Integer
Abc
activity
Varchar(1024)
Abc
abl_id
Varchar(62)
123
elaps_us
Integer
123
exec_us
Integer
Abc
Varchar(1024)
123
input_rows
Integer
123
input_mb
Numeric(38)
123
proc_rows
Integer
123
proc_mb
Numeric(38)
1v_mldb_node00021Unused1008,7,3315[null][null][null][null]
2v_mldb_node00021TopK HEAP1009,6,2134[null][null][null][null]
3v_mldb_node00021Emit TopK1010,6,2[null][null][null][null][null][null]
4v_mldb_node00021Send Data1011,5,1[null][null][null][null][null][null]
5v_mldb_node00022Evaluate Expressions1006,9,51812[null][null][null][null]
6v_mldb_node00023Build Join Inner1004,10,623[null][null][null][null][null]
7v_mldb_node00023Join (hash)1005,10,62495[null][null][null][null]
8v_mldb_node00023Combine Storage Chunks1007,8,4[null]580[null][null][null]
9v_mldb_node00023reserveVTLoaderResources1015,8,4[null][null][null][null][null][null]
10v_mldb_node00024Scan Projection1003,11,72514[null][null]0[null]
11v_mldb_node00025Scan Projection1001,13,9169[null][null]0[null]
12v_mldb_node00025Combine Storage Chunks1002,12,8[null]670[null][null][null]
13v_mldb_node00025reserveVTLoaderResources1016,12,8[null][null][null][null][null][null]
14v_mldb_node00041Unused1008,7,3312[null][null][null][null]
15v_mldb_node00041TopK HEAP1009,6,2130[null][null][null][null]
16v_mldb_node00041Emit TopK1010,6,2[null][null][null][null][null][null]
17v_mldb_node00041Send Data1011,5,1[null][null][null][null][null][null]
18v_mldb_node00042Evaluate Expressions1006,9,52112[null][null][null][null]
19v_mldb_node00043Build Join Inner1004,10,630[null][null][null][null][null]
20v_mldb_node00043Join (hash)1005,10,627127[null][null][null][null]
21v_mldb_node00043Combine Storage Chunks1007,8,4[null]550[null][null][null]
22v_mldb_node00043reserveVTLoaderResources1015,8,4[null][null][null][null][null][null]
23v_mldb_node00044Scan Projection1003,11,72714[null][null]0[null]
24v_mldb_node00045Scan Projection1001,13,91710[null][null]0[null]
25v_mldb_node00045Combine Storage Chunks1002,12,8[null]640[null][null][null]
26v_mldb_node00045reserveVTLoaderResources1016,12,8[null][null][null][null][null][null]
27v_mldb_node0001-1Send Data to Client1000,0,049695[null][null][null][null]
28v_mldb_node00010Unused1013,3,347740[null][null][null][null]
29v_mldb_node00010TopK1014,2,247556[null][null][null][null]
30v_mldb_node00011Unused1008,7,71075785112161[null][null][null][null]
31v_mldb_node00011TopK HEAP1009,6,6107578268538[null][null][null][null]
32v_mldb_node00011Emit TopK1010,6,6596[null][null][null][null][null]
33v_mldb_node00011Send Data1011,5,5[null][null][null][null][null][null]
34v_mldb_node00011Receive Data1012,4,4[null][null][null][null][null][null]
35v_mldb_node00012Evaluate Expressions1006,9,91075849220365[null][null][null][null]
36v_mldb_node00013Build Join Inner1004,10,101865488[null][null][null][null][null]
37v_mldb_node00013Join (hash)1005,10,1010759891024494[null][null][null][null]
38v_mldb_node00013Combine Storage Chunks1007,8,810757893079780[null][null][null]
39v_mldb_node00013reserveVTLoaderResources1015,8,8[null][null][null][null][null][null]
40v_mldb_node00014Scan Projection1003,11,1110760325941[null][null]35014[null]
41v_mldb_node00015Scan Projection1001,13,13637519183262[null][null]694456[null]
42v_mldb_node00015Combine Storage Chunks1002,12,126374523779460[null][null][null]
43v_mldb_node00015reserveVTLoaderResources1016,12,12[null][null][null][null][null][null]
44v_mldb_node00031Unused1008,7,3631[null][null][null][null]
45v_mldb_node00031TopK HEAP1009,6,2376[null][null][null][null]
46v_mldb_node00031Emit TopK1010,6,2[null][null][null][null][null][null]
47v_mldb_node00031Send Data1011,5,1[null][null][null][null][null][null]
48v_mldb_node00032Evaluate Expressions1006,9,54531[null][null][null][null]
49v_mldb_node00033Build Join Inner1004,10,653[null][null][null][null][null]
50v_mldb_node00033Join (hash)1005,10,659236[null][null][null][null]
51v_mldb_node00033Combine Storage Chunks1007,8,4[null]1400[null][null][null]
52v_mldb_node00033reserveVTLoaderResources1015,8,4[null][null][null][null][null][null]
53v_mldb_node00034Scan Projection1003,11,76231[null][null]0[null]
54v_mldb_node00035Scan Projection1001,13,94023[null][null]0[null]
55v_mldb_node00035Combine Storage Chunks1002,12,8[null]1540[null][null][null]
56v_mldb_node00035reserveVTLoaderResources1016,12,8[null][null][null][null][null][null]
Rows: 1-56 | Columns: 11

Projection Data Distribution

To obtain the projection data distribution, utilize the following syntax:

qprof.get_proj_data_distrib()
Abc
table_name
Varchar(257)
Abc
projection_name
Varchar(128)
Abc
node_name
Varchar(128)
123
row_count
Integer
123
used_bytes
Integer
123
ROS_count
Integer
123
del_rows
Integer
123
DV_count
Integer
Rows: 0 | Columns: 8

Note

This report is really useful to check if the data are correctly segmented.

Node/Cluster Information

Nodes

To get node-wise performance information, get_qexecution can be used:

qprof.get_qexecution()

Note

To use one specific node:

qprof.get_qexecution(
    node_name = "v_vdash_node0003",
    metric = "exec_time_us",
    kind = "pie",
)

To use multiple nodes:

qprof.get_qexecution(
    node_name = [
        "v_vdash_node0001",
        "v_vdash_node0003",
    ],
    metric = "exec_time_us",
    kind = "pie",
)

The node name is different for different configurations. You can search for the node names in the full report.

Cluster

To get cluster configuration details, we can use:

qprof.get_cluster_config()
Abc
host_name
Varchar(128)
123
open_files_limit
Integer
123
threads_limit
Integer
123
core_file_limit_max_size_bytes
Integer
123
processor_count
Integer
123
processor_core_count
Integer
Abc
Varchar(8192)
123
opened_file_count
Integer
123
opened_socket_count
Integer
123
opened_nonfile_nonsocket_count
Integer
123
total_memory_bytes
Integer
123
total_memory_free_bytes
Integer
123
total_buffer_memory_bytes
Integer
123
total_memory_cache_bytes
Integer
123
total_swap_memory_bytes
Integer
123
total_swap_memory_free_bytes
Integer
123
disk_space_free_mb
Integer
123
disk_space_used_mb
Integer
123
disk_space_total_mb
Integer
123
system_open_files
Integer
123
system_max_files
Integer
110.20.43.24010485763094405161278771227261318811214127104445606166528304373350432414616371221474795521375862784253600214060523942054187213051931
210.20.43.24110485763094398161107148827261322811212410880528219041792308688486426093386137621474795522089451520261997413220803942054176013051931
310.20.43.24210485763094399161113292827261118811212472320527806464000328368128026093278003221474795522120425472263333513087193942054172813051931
410.20.43.24310485763094399161113292827261118811212472320258251431936343208755252982362112021474795522112188416226145916805953942054158413051931
Rows: 1-4 | Columns: 21

The Cluster Report can also be conveniently extracted:

qprof.get_rp_status()
Abc
node_name
Varchar(128)
123
pool_oid
Integer
Abc
pool_name
Varchar(128)
010
is_internal
Boolean
123
memory_size_kb
Integer
123
memory_size_actual_kb
Integer
123
memory_inuse_kb
Integer
123
general_memory_borrowed_kb
Integer
123
queueing_threshold_kb
Integer
123
max_memory_size_kb
Integer
123
max_query_memory_size_kb
Integer
123
running_query_count
Integer
123
planned_concurrency
Integer
123
max_concurrency
Integer
010
is_standalone
Boolean
📅
queue_timeout
Interval day to second
123
queue_timeout_in_seconds
Integer
Abc
execution_parallelism
Varchar(128)
Abc
thread_policy
Varchar(128)
123
priority
Integer
Abc
runtime_priority
Varchar(128)
123
runtime_priority_threshold
Integer
123
runtimecap_in_seconds
Integer
Abc
single_initiator
Varchar(128)
123
query_budget_kb
Integer
Abc
cpu_affinity_set
Varchar(256)
Abc
cpu_affinity_mask
Varchar(1024)
Abc
cpu_affinity_mode
Varchar(128)
1v_mldb_node000145035996273705010general
✅
71050525471050525400674980032710505254[null]072[null]
✅
relativedelta(minutes=+5)300AUTOSYSTEM0MEDIUM2[null]false9374723ffffffffffffffffffANY
2v_mldb_node000145035996273705012sysquery
✅
10485761048576780490676211520711801600[null]172[null]
❌
relativedelta(minutes=+5)300AUTOSYSTEM110HIGH0[null]false14563ffffffffffffffffffANY
3v_mldb_node000145035996273705014tm
✅
387973123879731200712072832749550336[null]077
❌
relativedelta(minutes=+5)300AUTOSYSTEM105MEDIUM60[null]true5542473ffffffffffffffffffANY
4v_mldb_node000145035996273705016refresh
✅
0000675215360710753024[null]04[null]
❌
relativedelta(minutes=+5)300AUTOSYSTEM-10MEDIUM60[null]true168745008ffffffffffffffffffANY
5v_mldb_node000145035996273705018recovery
✅
0000675215360710753024[null]07437
❌
relativedelta(minutes=+5)300AUTOSYSTEM107MEDIUM60[null]true9121352ffffffffffffffffffANY
6v_mldb_node000145035996273705020dbd
✅
0000675215360710753024[null]04[null]
❌
relativedelta()0AUTOSYSTEM0MEDIUM0[null]true168745008ffffffffffffffffffANY
7v_mldb_node000145035996273705098jvm
✅
000019922942097152[null]072[null]
❌
relativedelta(minutes=+5)300AUTOSYSTEM0MEDIUM2[null]false27670ffffffffffffffffffANY
8v_mldb_node000145035996273705108blobdata
✅
00007130689675059891[null]020
❌
relativedelta()0AUTOSYSTEM0HIGH0[null]false[null]ffffffffffffffffffANY
9v_mldb_node000145035996273705110metadata
✅
24777024777000675215360710753024[null]010
❌
relativedelta()0AUTOSYSTEM108HIGH0[null]false[null]ffffffffffffffffffANY
10v_mldb_node000245035996273705010general
✅
71010018171010018100674595136710100181[null]072[null]
✅
relativedelta(minutes=+5)300AUTOSYSTEM0MEDIUM2[null]false9369377ffffffffffffffffffANY
11v_mldb_node000245035996273705012sysquery
✅
10485761048576569730676209984711800000[null]172[null]
❌
relativedelta(minutes=+5)300AUTOSYSTEM110HIGH0[null]false14563ffffffffffffffffffANY
12v_mldb_node000245035996273705014tm
✅
387973123879731200712071296749548736[null]077
❌
relativedelta(minutes=+5)300AUTOSYSTEM105MEDIUM60[null]true5542473ffffffffffffffffffANY
13v_mldb_node000245035996273705016refresh
✅
0000675213824710751424[null]04[null]
❌
relativedelta(minutes=+5)300AUTOSYSTEM-10MEDIUM60[null]true168648784ffffffffffffffffffANY
14v_mldb_node000245035996273705018recovery
✅
0000675213824710751424[null]07437
❌
relativedelta(minutes=+5)300AUTOSYSTEM107MEDIUM60[null]true9116150ffffffffffffffffffANY
15v_mldb_node000245035996273705020dbd
✅
0000675213824710751424[null]04[null]
❌
relativedelta()0AUTOSYSTEM0MEDIUM0[null]true168648784ffffffffffffffffffANY
16v_mldb_node000245035996273705098jvm
✅
000019922942097152[null]072[null]
❌
relativedelta(minutes=+5)300AUTOSYSTEM0MEDIUM2[null]false27670ffffffffffffffffffANY
17v_mldb_node000245035996273705108blobdata
✅
00007130674475059731[null]020
❌
relativedelta()0AUTOSYSTEM0HIGH0[null]false[null]ffffffffffffffffffANY
18v_mldb_node000245035996273705110metadata
✅
65124365124300675213824710751424[null]010
❌
relativedelta()0AUTOSYSTEM108HIGH0[null]false[null]ffffffffffffffffffANY
19v_mldb_node000445035996273705010general
✅
71010110871010110800674596032710101108[null]072[null]
✅
relativedelta(minutes=+5)300AUTOSYSTEM0MEDIUM2[null]false9369389ffffffffffffffffffANY
20v_mldb_node000445035996273705012sysquery
✅
10485761048576569730676210048711800064[null]172[null]
❌
relativedelta(minutes=+5)300AUTOSYSTEM110HIGH0[null]false14563ffffffffffffffffffANY
21v_mldb_node000445035996273705014tm
✅
387973123879731200712071360749548800[null]077
❌
relativedelta(minutes=+5)300AUTOSYSTEM105MEDIUM60[null]true5542473ffffffffffffffffffANY
22v_mldb_node000445035996273705016refresh
✅
0000675213888710751488[null]04[null]
❌
relativedelta(minutes=+5)300AUTOSYSTEM-10MEDIUM60[null]true168649008ffffffffffffffffffANY
23v_mldb_node000445035996273705018recovery
✅
0000675213888710751488[null]07437
❌
relativedelta(minutes=+5)300AUTOSYSTEM107MEDIUM60[null]true9116163ffffffffffffffffffANY
24v_mldb_node000445035996273705020dbd
✅
0000675213888710751488[null]04[null]
❌
relativedelta()0AUTOSYSTEM0MEDIUM0[null]true168649008ffffffffffffffffffANY
25v_mldb_node000445035996273705098jvm
✅
000019922942097152[null]072[null]
❌
relativedelta(minutes=+5)300AUTOSYSTEM0MEDIUM2[null]false27670ffffffffffffffffffANY
26v_mldb_node000445035996273705108blobdata
✅
00007130675275059737[null]020
❌
relativedelta()0AUTOSYSTEM0HIGH0[null]false[null]ffffffffffffffffffANY
27v_mldb_node000445035996273705110metadata
✅
65038065038000675213888710751488[null]010
❌
relativedelta()0AUTOSYSTEM108HIGH0[null]false[null]ffffffffffffffffffANY
28v_mldb_node000345035996273705010general
✅
71010004471010004400674595008710100044[null]072[null]
✅
relativedelta(minutes=+5)300AUTOSYSTEM0MEDIUM2[null]false9369375ffffffffffffffffffANY
29v_mldb_node000345035996273705012sysquery
✅
10485761048576569730676210048711800064[null]172[null]
❌
relativedelta(minutes=+5)300AUTOSYSTEM110HIGH0[null]false14563ffffffffffffffffffANY
30v_mldb_node000345035996273705014tm
✅
387973123879731200712071360749548800[null]077
❌
relativedelta(minutes=+5)300AUTOSYSTEM105MEDIUM60[null]true5542473ffffffffffffffffffANY
31v_mldb_node000345035996273705016refresh
✅
0000675213888710751488[null]04[null]
❌
relativedelta(minutes=+5)300AUTOSYSTEM-10MEDIUM60[null]true168648752ffffffffffffffffffANY
32v_mldb_node000345035996273705018recovery
✅
0000675213888710751488[null]07437
❌
relativedelta(minutes=+5)300AUTOSYSTEM107MEDIUM60[null]true9116149ffffffffffffffffffANY
33v_mldb_node000345035996273705020dbd
✅
0000675213888710751488[null]04[null]
❌
relativedelta()0AUTOSYSTEM0MEDIUM0[null]true168648752ffffffffffffffffffANY
34v_mldb_node000345035996273705098jvm
✅
000019922942097152[null]072[null]
❌
relativedelta(minutes=+5)300AUTOSYSTEM0MEDIUM2[null]false27670ffffffffffffffffffANY
35v_mldb_node000345035996273705108blobdata
✅
00007130675275059737[null]020
❌
relativedelta()0AUTOSYSTEM0HIGH0[null]false[null]ffffffffffffffffffANY
36v_mldb_node000345035996273705110metadata
✅
65144465144400675213888710751488[null]010
❌
relativedelta()0AUTOSYSTEM108HIGH0[null]false[null]ffffffffffffffffffANY
Rows: 1-36 | Columns: 28

Important

Each method may have multiple parameters and options. It is essential to refer to the documentation of each method to understand its usage.

__init__(transactions: None | str | int | tuple | list[int] | list[tuple[int, int]] | list[str] = None, key_id: str | None = None, resource_pool: str | None = None, target_schema: None | str | dict = None, session_control: None | dict | list[dict] | str | list[str] = None, overwrite: bool = False, add_profile: bool = True, check_tables: bool = True, ignore_operators_check: bool = True, iterchecks: bool = False, print_info: bool = True, run_only_session: bool = True) → None

Methods

__init__([transactions, key_id, ...])

export_profile(filename)

The export_profile() method provides a high-level interface for creating an export bundle of parquet files from a QueryProfiler instance.

get_activity_time()

Returns the a report including: Elapsed, exec_time and I/O by node, activity & path_id.

get_cluster_config()

Returns the Cluster configuration.

get_cpu_time([kind, reverse, categoryorder, ...])

Returns the CPU Time by node and path_id chart.

get_proj_data_distrib()

Returns the Projection Data Distribution.

get_qduration([unit])

Returns the Query duration.

get_qexecution([node_name, metric, path_id, ...])

Returns the Query execution chart.

get_qexecution_report([granularity, genSQL, ...])

Returns the Query execution report.

get_qplan([return_report, print_plan])

Returns the Query Plan chart.

get_qplan_explain([display_trees])

Returns the tree's query explain plan as a list of titles and trees.

get_qplan_profile([unit, kind, ...])

Returns the Query Plan chart.

get_qplan_tree([path_id, path_id_info, ...])

Draws the Query Plan tree.

get_qsteps([unit, kind, categoryorder, show])

Returns the Query Execution Steps chart.

get_queries()

Returns all the queries and their respective information, of a QueryProfiler object.

get_query_events()

Returns a :py:class`vDataFrame` that contains a table listing query events.

get_request([indent_sql, print_sql, return_html])

Returns the query linked to the object with the specified transaction ID and statement ID.

get_resource_acquisition()

Returns the a report including the resource acquisition.

get_rp_status()

Returns the RP status.

get_table([table_name])

Returns the associated Vertica Table.

get_version()

Returns the current Vertica version.

import_profile(target_schema, key_id, filename)

The static method import_profile can be used to create new QueryProfiler object from the contents of a export bundle.

insert(transactions)

Functions to insert new transactions to the copy of the performance tables.

next()

A utility function to utilize the next transaction from the QueryProfiler stack.

previous()

A utility function to utilize the previous transaction from the QueryProfiler stack.

set_position(idx)

A utility function to utilize a specific transaction from the QueryProfiler stack.

step(idx, *args, **kwargs)

Function to return the QueryProfiler Step.

to_html([path])

Creates an HTML report.