9 messages in com.mysql.lists.javaRe: Are scrollable ResultSets complet...
FromSent OnAttachments
Clemens Eisserer02 Sep 2005 14:01 
Mark Matthews02 Sep 2005 14:28 
Clemens Eisserer02 Sep 2005 14:44 
Mark Matthews02 Sep 2005 14:51 
Mich...@capgroup.com02 Sep 2005 14:54 
Clemens Eisserer02 Sep 2005 15:01 
Mark Matthews02 Sep 2005 15:19 
Clemens Eisserer02 Sep 2005 15:29 
Mark Matthews03 Sep 2005 05:33 
Subject:Re: Are scrollable ResultSets completly fetched from server?
From:Mich...@capgroup.com (Mich@capgroup.com)
Date:09/02/2005 02:54:45 PM
List:com.mysql.lists.java

Clemens,

Considering that scrollable result sets on _any_ RDBMS that has them are pretty heavy weight and can hold a lot of locks, etc, in my opinion it'd make more sense to do a SELECT COUNT(*) with the same WHERE clause, and use that, or re-architect your solution to not need to know the ultimate amount of rows (which is what a lot of applications do).

Perhaps an alternative is to include the COUNT(*) as one of the columns on your ResultSet. It would be repeated in every row, of course, but I'm uncertain as to whether there's a point where the extra weight on the ResultSet overcomes the extra wait on making a second call.

Michael