Saturday 14 December 2019

Performance-related issues in oracle ADF? How to Identify long-running queries of View Object?

The long-running query can be an important reason for the poor performance of the oracle ADF Application. The main point is how to identify that query in an ADF Application.

My ADF application was working fine earlier, but now it is slow. What's the reason??

My view object query is working fine in the database but when I am running in the ADF Application it is running slow? Why??

The above are the common question? Right?

The best way to identify a slow query is through the ADF logs. ADF shows all the model layer activities using oracle.jbo logger and by setting it to finest we can see minute details of the processes that are being executed when the application is running.

ADF logger is a very important tool that can be used in development for debugging. It provides mynute details that can be used to identifying the issues in the ADF applications. I provides you the runtime queries along with the parameters which are used to call the queries.

Here is how you can use the logger.
1. Open the Weblogic log and click on Configure Oracle Diagnostic Logging

oracle adf Weblogic log console

2. After that, the logger screen will open. Go to oracle.jbo logger and set the level to "Finest". The finest level log shows each and every activity which is being performed by the framework.


3. Finest log generates a large no. of rows, so for viewing the whole log we need to increase the log lines in preferences. Initially, it's 3000. Increase the limit to 300000.

Log prefefences in JDeveloper

4. Now when we run the Application (I have taken a sample app with Departments ViewObjects with a view criteria).

how to run an adf application

 5. After the application is started just check the log. Here you can see the query which is executed by the framework to fetch the data along with bind Variables.



How can this be used to identify the queries which are running slow??

Using log we can identify the long-running queries.
1. Run the application and when the application is loading or performing some action which is slow check the log.
2. If the log is stuck at some query for a longer time as shown above in the screenshot, then make a note and thats the query you need to work upon.


Thanks

If you have any queries related to the above blog, feel free to ask. :)


No comments:

Post a Comment