Re: COUNT & Pagination - Mailing list pgsql-performance

From David Shadovitz
Subject Re: COUNT & Pagination
Date
Msg-id 01C3D8DF.271378C0.david@shadovitz.com
Whole thread Raw
In response to COUNT & Pagination  (David Shadovitz <david@shadovitz.com>)
Responses Re: COUNT & Pagination  (Robert Treat <xzilla@users.sourceforge.net>)
List pgsql-performance
> If you only need the count when you've got the results, most PG client
> interfaces will tell you how many rows you've got. What language is your app
> in?

PHP.
But I have only a subset of the results, retrieved via a query with a "LIMIT
<m>" clause, so $pg_numrows is m.
And retrieving all results (i.e. no LIMIT) is at least as expensive as
COUNT(*).

-David

pgsql-performance by date:

Previous
From: Andrew Rawnsley
Date:
Subject: Re: annoying query/planner choice
Next
From: Hannu Krosing
Date:
Subject: Re: failures on machines using jfs