This application illustrates the Column-Type Specification
performance extension of Oracle JDBC drivers. It gives a comparison between
DEFAULT FETCH and FETCH WITH COLUMN TYPE SPECIFIED. The corresponding
execution time will be displayed in the text fields. Thus the user will
be able to see the advantage of specifying the Column Type by comparing
the execution time.
From JDK for Windows
This section will describe steps to run
the application from console using JDK on Windows. The
sample can be run either manually
or using a script file
.
Run application
using batch File: run.bat provided:
By setting few environment variables, the
sample application could be directly run by just executing the batch
file: run.bat from the command prompt, from ColumnTypeSample directory. Environmental variables JAVA_HOME and JDBC_HOME have to be set before running run.bat file.
Example:
D:\ColumnTypeSample> set JDBC_HOME=d:\oracle9i\jdbc\lib
D:\ColumnTypeSample>
set JAVA_HOME=d:\jdk1.3.1
D:\ColumnTypeSample>
run
Running the application
manually:
-
Set CLASSPATH to include
Oracle9i JDBC Driver file: classes12.zip or classes12.jar.
- Also add ColumnTypeSample directory where Connection.properties exists and
the current directory to the CLASSPATH
Example:
D:\ColumnTypeSample>set CLASSPATH=D:\oracle9i\jdbc\lib\classes12.zip;D:\ColumnTypeSample;.
- From the directory ColumnTypeSample\src\oracle\otnsamples\jdbc\columntype, compile all the java files using javac:
Example:
D:\ColumnTypeSample\src\oracle\otnsamples\jdbc\columntype>javac
-d . *.java
- Run the class file using java from
ColumnTypeSample\src\oracle\otnsamples\jdbc\columntype directory
Example:
D:\ColumnTypeSample\src\oracle\otnsamples\jdbc\columntype>
java oracle.otnsamples.jdbc.columntype.ColumnTypeSample
From JDK for Red Hat Linux Advanced Server release 2.1
This section will describe steps to run
the application from console using JDK on Linux. The
sample can be run either manually
or using a script file .
Run application
using batch File: run.sh provided:
By setting few environment variables, the
sample application could be directly run by just executing the batch
file: run.sh from the command prompt, from ColumnTypeSample directory.
Environmental variables JAVA_HOME and JDBC_HOME have to be set, else the user will be prompted to enter values.
- Go to ColumnTypeSample directory
and from the $ prompt use the command below to give execute permission to
the file.
$chmod 777 run.sh
- Now run the file:
$sh run.sh
Running the application
manually: