Tracking SQL Execution time implementation code in the ADF

Source: Internet
Author: User

ADF is a set of enterprise development solutions provided by oracle.
For a recent performance test, you need to obtain the number of SQL queries on the current page and the amount of time it takes. The first thing that comes to mind is that the common log4jdbc result ADF does not support encapsulated drivers. Later, I tried to intercept it on the ipve DB layer. It was complicated to set the sesson attribute of the database connection, and I also needed to modify the code later.

The viewobjecibd of the ADF provides the method for re-writing SQL calls, but you need to modify the existing code. Finally, you need to modify the source code of the ADF to obtain the SQL Execution time without modifying the existing code.

Use the modified adfm. jar to overwrite existing ones. Configure the VM startup parameter-DSQLTruckerToFile = D: \ log.txt-DenableSQLTracker = true
Restart to view the SQL Execution time.

195: <SQL:> SELECT Geos. CREATED_BY, Geos. CREATED_TS, Geos. FAX_NUMBER, Geos. FROM_EMAIL_ADDRESS, Geos. ID, Geos. MODIFIED_BY, Geos. MODIFIED_TS, Geos. NAME, Geos. PHONE_NUMBER, Geos. REPLY_TO_EMAIL_ADDRESS, Geos. IS_DEFAULT from geos Geos order by Geos. IS_DEFAULT, Geos. NAME
195: <ElapsedTime (MS):> 729

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.