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:Mark Matthews (ma@mysql.com)
Date:09/02/2005 03:19:28 PM
List:com.mysql.lists.java

-----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1

Clemens Eisserer wrote:

Hi again,

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).

Well I already tried this, but since I also have a order-by clause in the same query this does not work of course :-( As far as it seems I'll have to do 2 queries (hmm, pretty sad since those are slow full-text queries (where like %blblbl%)) - however better than sending the whole data-sets between client and server.

Thanks a lot for all the helpful comment, lg Clemens

Clemens,

You could always do a SELECT ... INTO a temp table, and use that as what you're actually populating your JTable with, and doing the count(*) on.

-Mark

iD8DBQFDGNAFtvXNTca6JD8RAj7MAJ9k0zzf6GvIn+sRTrijGCPP44nZVgCgyc8e 0tIj3YJGLZex3iDzzLrEoSo= =KlmZ -----END PGP SIGNATURE-----