cocoon-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Leszek Gawron <o...@vip.net.pl>
Subject Re: big ESQL performance problem - this one's weird
Date Wed, 05 Mar 2003 10:31:19 GMT
On śro, mar 05, 2003 at 01:16:26 +0100, Torsten Curdt wrote:
> > > Anyway, Leszek, could you please check with the same ResultSet type
> > > (ResultSet.TYPE_SCROLL_INSENSITIVE,ResultSet.CONCUR_READ_ONLY)
> > > as in the JdbcEsqlQuery?
> > Sure no problem, gonna make this my first thing to do in the morning
Let me give you my test cases:
p:logic>
try {
	Connection conn = DriverManager.getConnection("jdbc:pervasive://localhost:1583/fppcsouzo");

	Statement stmt = conn.createStatement();
	stmt.execute( "select * from kontrah" );
	ResultSet rs = stmt.getResultSet(); 
	while ( rs.next() ) {
		<first><xsp:expr>rs.getString(1)</xsp:expr></first>
	}
} catch ( SQLException e ) {
	<error><xsp:expr>e.toString()</xsp:expr>!</error>
}
</xsp:logic>

this runs about 5 seconds for table with 5.5k rows

while this one:
<xsp:logic>
try {
	Connection conn = DriverManager.getConnection("jdbc:pervasive://localhost:1583/fppcsouzo");

	PreparedStatement prepstmt = conn.prepareStatement(
                                				"select * from kontrah",
                                				ResultSet.TYPE_SCROLL_INSENSITIVE,
                                				ResultSet.CONCUR_READ_ONLY );
    prepstmt.execute();
    ResultSet rs = prepstmt.getResultSet();

	while ( rs.next() ) {
		<first><xsp:expr>rs.getString(1)</xsp:expr></first>
	}
} catch ( SQLException e ) {
	<error><xsp:expr>e.toString()</xsp:expr>!</error>
}
</xsp:logic>

got tired of waiting to finish so it will take at least 5 minutes (last time it took 9.9 minutes)
	ouzo

-- 
            __
         | /  \ |        Leszek Gawron            //  \\
        \_\\  //_/      ouzo@vip.net.pl          _\\()//_
         .'/()\'.     Phone: +48(600)341118     / //  \\ \
          \\  //  recursive: adj; see recursive  | \__/ |


Mime
View raw message