Skip to content
eostermueller edited this page Nov 14, 2014 · 85 revisions

Step 1: Install and Run

  1. Download wuqiSpank-0.07.jar to your machine, assuming myserver.com

  2. THIS REQUIRES JAVA 1.7. Launch wuqiSpank web app by running
    java -jar wuqiSpank-0.07.jar. This prompt/shell will appear to 'hang' -- it must remain open/running.

  3. On any machine you want, Test wuqiSpank by hitting this URL in your favorite browser: http://myserver.com:8080/wuqiSpank .

  4. Nothing much to see, right? Read on to Step 2 to feed SQL to wuqiSpank.

Step 2: Feeding SQL to wuqiSpank

If your SQL is not from a Java application use [Text File Import](Text File Import).

Otherwise, wuqiSpank can capture/trace SQL statements from your JDBC app using the following instructions. For simplicity, these instructions assume that your JDBC app and the wuqiSpank you started above are on the exact same machine, myserver.com.

  1. Download intrace-agent.jar to myserver.com.

  2. Using download path above, add the following JVM parameter to the Java JDBC web app to be traced:

    -javaagent:c:\mypath\intrace-agent.jar=[gzip-true[exit-stack-trace-true
    
  3. If your app is not using Oracle 11g, configure wuqiSpank with the JDBC driver you are using.

  4. Exercise your JDBC web application, so wuqiSpank has some SQL to review.

  5. View the Table Access Timelines at http://myserver.com:8080/wuqiSpank. You must refresh your browser to see newly captured traces.

Step 3: Table Classification Meeting

wuqiSpank colors the background of certain tables to help developers remember the special needs of that kind of table. So before working with wuqiSpank, developers (and perhaps a DBA) should meet to decided these two things.

  1. Which tables should be cached because their data seldom changes? This page details how to flag these 'static' tables as blue.

  2. Which tables are the most likely to grow large in production? This page details how to flag these 'growth' tables as red. Developers should take extra care to minimize these queries to the largest tables. Perhaps the largest 10% of all tables should be included in this list.

Configure

Advanced users might need [these things](Advanced Configuration). All configuration happens in the following three places:

Documentation Program Config Location Notes
(doc) JDBC web app you want to trace java command line From step 2, above. Use the entire -javaagent parm from above section.
(doc) wuqiSpank web app web.xml Tells wuqiSpank which JDBC driver to trace.
wuqiSpank web app java -jar command line From step 5, above. By default, wuqiSpank web app receives browser requests on port 8080. Add "-httpPort=8079" to change port.