Hi,
I need the same output as the Top SQL statements by wait time graph, but in csv/xls format.
To this end, I have been trying to extract the data directly from the database, but I am unsure of how to accomplish this.
I thought the numbers in CON_STATS_SUM_ were what I needed, but when extracting data based off of it for a certain date, the numbers I get in the query do not match the numbers I get in the graph from the DPA interface.
This is what I've tried:
with top_statements as ( select SQLHASH, DATEHOUR, TIMESECS, ROW_NUMBER() over (partition by DATEHOUR order by TIMESECS desc) RN from ignite.CON_STATS_SUM_1 where DATEHOUR between '19 Sep 2018' and '20 Sep 2018' ) select DATEHOUR, SUM(TIMESECS) from top_statements where RN <= 15 group by DATEHOUR |
I would like to use the exact same query that the graph is based on, as this will be submitted to a group that will be reviewing them along side the graphs (so the numbers must match).
I just don't know where that query is...
* This is for a Sybase ASE instance.
Any help with this would be great.
Thanks!