
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()
010is_current123transaction_id123statement_idAbcrequest_labelAbc123qduration📅start_timestamp📅end_timestamp0 ✅ 45035996275851310 2 8.409364 2024-08-08 16:45:36.608497 2024-08-08 16:45:45.012267 Rows: 1-1 | Columns: 9Note
For more details, please look at
QueryProfiler
.