On Sunday 11 January 2004 18:10, David Shadovitz wrote:
> I understand that COUNT queries are expensive. So I'm looking for advice
> on displaying paginated query results.
>
> I display my query results like this:
>
> Displaying 1 to 50 of 2905.
> 1-50 | 51-100 | 101-150 | etc.
>
> I do this by executing two queries.
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?
--
Richard Huxton
Archonet Ltd