Loading...

verticapy.performance.vertica.qprof_interface.QueryProfilerInterface.to_html

QueryProfilerInterface.to_html(path: str | None = None) str

Creates an HTML report.

Parameters

path: str, optional

Path where the report will be exported.

Warning

The report will be created in the local machine.

Returns

str

HTML report.

Examples

First, let’s import the QueryProfiler object.

from verticapy.performance.vertica import QueryProfiler

Then we can create a query:

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;"
)

We can generate easily the HTML report:

qprof.to_html()

Note

For more details, please look at QueryProfiler.