Re: Re: is this possible? it should be!

Поиск
Список
Период
Сортировка
От newsreader@mediaone.net
Тема Re: Re: is this possible? it should be!
Дата
Msg-id 20010820233144.A30182@dragon.universe
обсуждение исходный текст
Ответ на Re: is this possible? it should be!  (reina@nsi.edu (Tony Reina))
Ответы Re: Re: is this possible? it should be!  (Stephan Szabo <sszabo@megazone23.bigpanda.com>)
Список pgsql-general
On Mon, Aug 20, 2001 at 04:56:29PM -0700, Tony Reina wrote:
> Perhaps GROUP BY will get you where you want to go:
>
> select count(*), a, b, c from a where d=2 group by a, b, c order by e limit 10;
>
>

Here count(*) doesn't give total count i.e. grand total
count if there is no "limit."


What would be nice is if pg would return 10 rows but declare
at the bottom of the display to give total rows number.  This way
DBI can just do
    $n=$sql->total_rows;
or something like that.  I think it requires a major
hack on postgres?  No?  I don't think it will be
any additional cpu cost to return total number of rows
since sorting needs to know all rows and hence
total number of rows


В списке pgsql-general по дате отправления:

Предыдущее
От: "Robert J. Sanford, Jr."
Дата:
Сообщение: RE: clustering and/or failover?
Следующее
От: "Kevin J. Drewiske"
Дата:
Сообщение: RE: Printable report generation