P6spy combined with SQL profiler Configuration

Source: Internet
Author: User
P6spy combined with SQL profiler Configuration

P6spy is a dynamic monitoring framework for database access. It has been very mature for a long time. p6spy simulates a standard JDBC driver and acts as a proxy for the real underlying JDBC driver. That is to say, we only need to configure the JDBC driver used in the system as the p6spy driver, and configure the realdriver in the p6spy configuration as the actual JDBC driver, so that we can use its performance monitoring function.

Sqlprofiler is the peripheral resource of p6spy, and p6spy is recorded using log files, which looks troublesome. sqlprofiler provides a graphical monitoring interface for us to monitor the SQL Execution Process in real time, calculate and optimize the execution results.

I. graphical monitoring and use of p6spy in combination with SQL profiler
1. Install the SQL profiler package from the http://www.jahia.net/download;
2. Put p6spy. jar and sqlprofiler. jar in classpath. If it is a Web application, put it in yourwebapp/WEB-INF/lib/directory;
3, put the spy. properties to the classes directory, if webapp is placed in yourwebapp/WEB-INF/classess/directory, and LIB/directory, two places. (Special Note !!!!)
4. You do not need to change the driver name com. p6spy. Engine. Spy. p6spydriver of your program;
5. Open the spy. properties file and change the realdriver value to the database driver name of your program;
6. run Java-jar sqlprofiler. jar to start SQL profiler and check the startup interface;
7. Start your application or server and process normal system requests;
8. The results are displayed and analyzed on the SQL profiler graphical interface.
You can also click the Save button to export the index script recommended for database optimization.

 

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.