1) Query by Elapsed Time
2) Query by CPU Time
In the report, you can see how much DB query time a query takes and you can start to fix the query which takes the most. In Oracle databases, there is the Snapshot concept. Oracle regularly takes a snapshot of the database instance and stores it. You can generate an AWR report by giving two snapshot IDs, start and end. Probable statement for getting the AWR report would be:
SELECT output FROM TABLE (dbms_workload_repository.awr_report_text (<DB ID>, <InstanceID>, <BeginSnapID>, <EndSnapID>));
That was helpful, thanks!
ReplyDelete