Kbase P22622: Performance problem when using TYPE_SCROLL_SENSITIVE with 9.
Autor |
  Progress Software Corporation - Progress |
Acesso |
  Público |
Publicação |
  7/18/2006 |
|
Status: Unverified
FACT(s) (Environment):
Progress 9.1D
SYMPTOM(s):
Performance problem may occur when using TYPE_SCROLL_SENSITIVE with 9.1D SQL-92 JDBC Driver
The method TYPE_SCROLL_SENSITIVE is used in a resultSet
With the method TYPE_FORWARD_ONLY, the same query runs much faster
The following example shows the issue:
public class code{
public static void main (String args[])
{
try {
String driver = "com.progress.sql.jdbc.JdbcProgressDriver";
String URL = "jdbc:JdbcProgress:T:localhost:4000:sports2000";
String username= "test";
String password= "test";
int rowCount;
Class.forName("com.progress.sql.jdbc.JdbcProgressDriver");
long d= System.currentTimeMillis();
Connection con = DriverManager.getConnection(URL, username, password);
PreparedStatement pst =
con.prepareStatement("Select name from pub.customer",
ResultSet.TYPE_SCROLL_SENSITIVE,
ResultSet.CONCUR_UPDATABLE);
pst.setMaxRows(200);
System.out.println("Connected to " + URL);
ResultSet rs = pst.executeQuery();
/* Go to the last row and get the row number. This will tell us
how many rows were returned by the query. */
int i=0;
while(rs.next()) i++;
System.out.println("There are " + i +
" rows in the query , time = " + (System.currentTimeMillis() - d));
rs.close();
con.close();
}
catch (SQLException ex)
{
// A SQLException was generated. Catch it and
// display the error information. Note that there
// could be multiple error objects chained
// together
System.out.println ("*** (debugging) in sql exception block...");
while (ex != null)
{
System.out.println ("SQLState: " + ex.getSQLState ());
System.out.println ("Message: " + ex.getMessage ());
System.out.println ("VendorCode: " + ex.getErrorCode ());
ex = ex.getNextException ();
System.out.println ("");
}
}
catch (java.lang.Exception ex)
{
System.out.println ("*** (debugging) in general exception block...");
// Got some other type of exception. Dump it.
ex.printStackTrace ();
}
}
}
CAUSE:
Known issue
CAUSE:
Bug #20030403-012
FIX:
There is no fix at this time of writing