verticapy.performance.vertica.qprof.QueryProfiler.get_queries¶
- QueryProfiler.get_queries() vDataFrame¶
Returns all the queries and their respective information, of a
QueryProfilerobject.Returns¶
- vDataFrame
queries information.
Examples¶
First, let’s import the
QueryProfilerobject.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 ✅ 45035996276913960 3 5.102154 2024-10-31 11:42:24.515589 2024-10-31 11:42:29.595475 Rows: 1-1 | Columns: 9Note
For more details, please look at
QueryProfiler.