I have an ADF application which has many SQL queried running on each button click/page load, so how to find out which query is taking what amount of time? So that i can identify the long running queries and modify them to improve the application performance.
Thanks in advance.
If you are interested in the real time the query needed you have to check the DB. If you are using an Oracle DB you can ask your dba to check the sql of your session. There are reports which you can use to get the the time of the sql send to the server.
If you try to check the time from the adfbc point of view (including network and other overhead) you set SQL trace on for the session you run the app locally to get the trace files. More info on that: Diagnosability in JDBC
Or you overwrite the executeQueryForCollection method in the VO and add some timing code in there.
As suggested by Timo,you need to start tracing on oracle.jbo package for getting the SQL queries.But I think the second option suggested by him would be better.You will have to override executeQueryForCollection method in VO Impl class .Pseudo code would be
Take start time
Take end time
If you want a general solution, that does not require you to make "hooks" in your source code, I suggest you look into the ADF logger.
See especially figure 36-9, that gives the runtime of ALL queries executed in an ADF request.
This can be used in production systems also, where you can set the appropreate logging levels using Weblogic Enterprise Manager and then download the diagnostics log and then open it in the Diagnostics Log Analyzer in JDeveloper. Very useful for debugging performance issues in production.