Skip to main content
Last updated August 02, 2011 14:25, by windli

DBTester Wiki

This is a small tool to allow java developers to test different sql queries on database. With the abilities run different sqls with different variable bindings for some times, especially binding a list to in clause parameter. DBAs have their powerful sqlpus tools. But they are not run same as the java developers do. This tool can output the execution times, and/or output the results. This will help java developers on tuning the sql performance.

Usage: java -jar dbtester [folder [ []]] [> test.csv]

folder:run all sqls under this folder, current folder if not provided : put your jdbc configurations : put your general variable bindings, and some global configuration like whether to output the results You can redirect the output to a csv file, it includes all the sqls execution times.

You can also output the execution plans with this application.

This is a example:

 #listparameter=Type:List:yyyy-MM-dd HH:mm:ss ,type can:String,Long,Double,Date
 #_explain_format_=  one of TYPICAL BASIC ALL SERIAL ADVANCED, refer to DBMS_XPLAN.DISPLAY 
 StartDate=Date:2011-07-21 13:00:00
 EndDate=Date:2011-07-23 13:00:00
Please Confirm