RE : Nmber of rows in a ResultSet

From: "Xavier Bugaud" <xavier(dot)bugaud(at)gloptv(dot)com>
To: <pgsql-jdbc(at)postgresql(dot)org>
Subject: RE : Nmber of rows in a ResultSet
Date: 2004-01-09 09:53:04
Message-ID: 94BCF3512BFBD711B79D004005420B1F03F6D8@PMSERVER
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-jdbc

> On Fri, 9 Jan 2004, Kris Jurka wrote:
>
> > In the last JDBC drivers, is there a means to get the number of rows
> > directly (without using 'SELECT COUNT(*)' or
> 'rs.last();rs.getrow();') ?
>
> I don't see what's so wrong with rs.last() and rs.getRow().
>

Thank you for the response.

What is wrong with rs.last() and rs.getRow() is
- it requires scrollable cursors in order to get back to the first row
- it will certainly slow down the operation in case of huge amount of
rows (I don't known how the Postgres driver handle that, so maybe this
is wrong... I hope so)

Regards
--
Xavier Bugaud
www.gloptv.com

Responses

Browse pgsql-jdbc by date

  From Date Subject
Next Message Kris Jurka 2004-01-09 09:54:13 Re: [BUG] - Invalid UNICODE character sequence found
Previous Message Kris Jurka 2004-01-09 09:30:12 Re: JDBC driver doesn't handle NaN values