Re: Way to use count() and LIMIT?

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: "Greg Sabino Mullane" <greg(at)turnstep(dot)com>
Cc: pgsql-general(at)postgresql(dot)org
Subject: Re: Way to use count() and LIMIT?
Date: 2001-12-19 17:13:25
Message-ID: 1164.1008782005@sss.pgh.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

"Greg Sabino Mullane" <greg(at)turnstep(dot)com> writes:
> Still, it seems that there should be a way to grab the information,
> especially if you have an "ORDER BY" clause in your query - after
> all, that means at some point, postgres knows how many records
> matched before it ORDERS and LIMITS them.

Not necessarily; it could be using an indexscan to do the ordering.

regards, tom lane

In response to

Browse pgsql-general by date

  From Date Subject
Next Message Ian Harding 2001-12-19 17:31:11 Can't use subselect in check constraint
Previous Message Greg Sabino Mullane 2001-12-19 15:55:12 Re: Way to use count() and LIMIT?