Loading...

verticapy.performance.vertica.qprof_interface.QueryProfilerInterface

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

A class that inherits QueryProfiler and adds visualization features.

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

Methods

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

apply_tree_settings(_)

client_data_test()

This test can be used to check if the time to send the data to client is too huge.

clock_exec_time_test()

This test can be used to check if the execution time is near to the clock time.

exec_time_test()

Checks if the parser of the SQL is taking too much time.

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()

Returns an interactive CPU Time by node and path_id.

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()

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([use_javascript])

Draws an interactive Query plan tree.

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

Returns the Query Execution Steps chart.

get_qsteps_()

Returns an interactive 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_step_funcs()

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.

main_tests()

This is the main test to run to get all the information needed to understand queries performances.

next()

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

next_button_clicked(button)

Callback function triggered when the user click on the button to go to the next transaction/query.

next_step_clicked(button)

pool_queue_wait_time_test()

This test can be used to see if a pool takes too much time to be allocated.

prev_button_clicked(button)

Callback function triggered when the user click on the button to go to the previous transaction/query.

prev_step_clicked(button)

previous()

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

qsteps_clicked(_)

query_events_test()

This test can be used to check all types of events.

query_select_button_selected(selection)

Callback function triggered when the user selects the index of a particular query.

refresh_clicked(button)

segmentation_test()

This test can be used to check if the data are correctly segmented.

set_position(idx)

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

step()

Function to return the QueryProfiler Step.

to_html([path])

Creates an HTML report.

update_cpu_time(query_idx, kind, categoryorder)

Callback function that displays the CPU Time by node and path_id.

update_qplan_tree(metric1, metric2, ...)

Callback function that displays the Query Plan Tree.

update_qsteps(query_idx, clicked)

Callback function that displays the Query Execution Steps.

update_query_display()

Updates the query display text widget with the current query.

update_step(step_idx)

Callback function that calls a step function based on the step idx.