Loading...

verticapy.performance.vertica.qprof.QueryProfiler.get_queries

QueryProfiler.get_queries() vDataFrame

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

Returns

vDataFrame

queries information.

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 easily look at all the transactions:

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
4503599627585131028.4093642024-08-08 16:45:36.6084972024-08-08 16:45:45.012267
Rows: 1-1 | Columns: 9

Note

For more details, please look at QueryProfiler.