This application illustrates the use of row prefetching
performance extension. It gives a comparison between querying using three
different values of row-prefetch:
- The default value
- Row-Prefetch value of 100
- Row-Prefetch value of 200
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 RowPrefetchSampledirectory. Environmental variables JAVA_HOME and JDBC_HOME have to be set before running run.bat file.
Example:
D:\RowPrefetchSample> set JDBC_HOME=d:\oracle9i\jdbc\lib
D:\RowPrefetchSample>
set JAVA_HOME=d:\jdk1.3.1
D:\RowPrefetchSample>
run
Running the application
manually:
-
Set CLASSPATH to include
Oracle9i JDBC Driver file: classes12.zip or classes12.jar or
ojdbc14.jar.
- Also add RowPrefetchSample directory where Connection.properties exists and
the current directory to the CLASSPATH
Example:
D:\RowPrefetchSample>set
CLASSPATH=D:\oracle9i\jdbc\lib\classes12.zip;D:\RowPrefetchSample;.
- From the directory RowPrefetchSample\src\oracle\otnsamples\jdbc\prefetch, compile all the java files using javac:
Example:
D:\RowPrefetchSample\src\oracle\otnsamples\jdbc\prefetch>javac
-d . *.java
- Run the class file using java from
RowPrefetchSample\src\oracle\otnsamples\jdbc\prefetch directory
Example:
D:\RowPrefetchSample\src\oracle\otnsamples\jdbc\prefetch>
java oracle.otnsamples.jdbc.prefetch.RowPrefetchSample
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 RowPrefetchSample
directory. Environmental variables JAVA_HOME and JDBC_HOME have to be set, else the user will be prompted to enter values.
- Go to RowPrefetchSample 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: