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, session_control: None | dict | list[dict] | str | list[str] = None, overwrite: bool = False, add_profile: bool = True, check_tables: bool = True, iterchecks: bool = False, print_info: bool = True)¶
A class that inherits
QueryProfilerand 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, session_control: None | dict | list[dict] | str | list[str] = 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, ...])This test can be used to check if the time to send the data to client is too huge.
This test can be used to check if the execution time is near to the clock time.
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.Returns the a report including: Elapsed, exec_time and I/O by node, activity & path_id.
Returns the Cluster configuration.
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([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
listof titles and trees.get_qplan_profile([unit, kind, ...])Returns the Query Plan chart.
get_qplan_tree([use_javascript, hide_settings])Draws an interactive Query plan tree.
get_qsteps([unit, kind, categoryorder, show])Returns the Query Execution Steps chart.
Returns an interactive Query Execution Steps chart.
Returns all the queries and their respective information, of a
QueryProfilerobject.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.
Returns the a report including the resource acquisition.
Returns the RP status.
get_step_funcs()get_table([table_name])Returns the associated Vertica Table.
Returns the current Vertica version.
import_profile(target_schema, key_id, filename)The static method
import_profilecan be used to create newQueryProfilerobject from the contents of a export bundle.insert(transactions)Functions to insert new transactions to the copy of the performance tables.
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
QueryProfilerstack.This test can be used to see if a pool takes too much time to be allocated.
previous()A utility function to utilize the previous transaction from the
QueryProfilerstack.This test can be used to check all types of events.
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
QueryProfilerstack.step()Function to return the
QueryProfilerStep.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_qsteps(query_idx, clicked)Callback function that displays the Query Execution Steps.
update_step(step_idx)Callback function that calls a step function based on the step idx.