Getting Started
-
Download wuqiSpank-0.07.jar to your machine, assuming myserver.com
-
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. -
On any machine you want, Test wuqiSpank by hitting this URL in your favorite browser: http://myserver.com:8080/wuqiSpank .
-
Nothing much to see, right? Read on to Step 2 to feed 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.
-
Download intrace-agent.jar to myserver.com.
-
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
-
If your app is not using Oracle 11g, configure wuqiSpank with the JDBC driver you are using.
-
Exercise your JDBC web application, so wuqiSpank has some SQL to review.
-
View the Table Access Timelines at http://myserver.com:8080/wuqiSpank. You must refresh your browser to see newly captured traces.
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.
-
Which tables should be cached because their data seldom changes? This page details how to flag these 'static' tables as blue.
-
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.
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. |