Way to use count() and LIMIT?

From: Joe Koenig <joe(at)jwebmedia(dot)com>
To: pgsql-general(at)postgresql(dot)org
Subject: Way to use count() and LIMIT?
Date: 2001-12-18 18:04:00
Message-ID: 3C1F8511.B9FFB772@jwebmedia.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

Is there a way to structure a query so you can only run 1 query, get the
full number of rows that would be returned, but then use LIMIT to step
through in groups of 20? For example, a search in my CD's/Rock section
will return 53,000 results. I want to give the user the number of total
results, but also use LIMIT to go through 20 at a time? Does this
require 2 queries? Thanks,

Joe

Responses

Browse pgsql-general by date

  From Date Subject
Next Message Jason Earl 2001-12-18 19:27:10 Re: Way to use count() and LIMIT?
Previous Message Josh Berkus 2001-12-18 16:37:46 Re: Operation on bit strings with different length