Re: Counting records in a PL/pgsql cursor

Поиск
Список
Период
Сортировка
От redhog
Тема Re: Counting records in a PL/pgsql cursor
Дата
Msg-id 1162564769.921615.22450@e3g2000cwe.googlegroups.com
обсуждение исходный текст
Ответ на Re: Counting records in a PL/pgsql cursor  ("Magnus Hagander" <mha@sollentuna.net>)
Ответы Re: Counting records in a PL/pgsql cursor  ("Magnus Hagander" <mha@sollentuna.net>)
Список pgsql-general
> Nope, the query is way too expensive to run it twice. (GIN scan over
> well over half a million rows. It's faster to do the
> get-as-cursor-then-loop-and-increment, I've measured that)

Can't you select into a temporary table and then do select count(*)
over that table, aswell as run your cursor over that temporary table?
Or is that way to space expensive?


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

Предыдущее
От: Luca Ferrari
Дата:
Сообщение: problem accessing a database
Следующее
От: "Magnus Hagander"
Дата:
Сообщение: Re: Counting records in a PL/pgsql cursor