COUNT - Mailing list pgsql-jdbc

From Lufkin, Brad
Subject COUNT
Date
Msg-id 0E253E40DC78F4499CEDDE9223099F430706B831@xcgva040.northgrum.com
Whole thread Raw
List pgsql-jdbc
I'm trying to determine the number of rows in a table with the following
statement:

    ResultSet resultSet = statement.executeQuery("SELECT COUNT(*) FROM
table");

This is apparently causing a sequential scan of the table (which has several
million rows). Is there a faster way of  determining the number of rows in a
table?

pgsql-jdbc by date:

Previous
From: buki@gmx.net (Andreas Buer)
Date:
Subject: Writing binary - UPDATE
Next
From: Barry Lind
Date:
Subject: Re: Writing binary - UPDATE