Re: How to avoid "Seq Scans"?

Поиск
Список
Период
Сортировка
От Richard Huxton
Тема Re: How to avoid "Seq Scans"?
Дата
Msg-id 46D53A75.8090708@archonet.com
обсуждение исходный текст
Ответ на How to avoid "Seq Scans"?  (Vincenzo Romano <vincenzo.romano@gmail.com>)
Ответы Re: How to avoid "Seq Scans"?
Список pgsql-general
Vincenzo Romano wrote:
> Hi all.
>
> In PG 8.2.4 I have a 4+M rows table like this:

> I'd need to write a stored function that should do the
> following:
>
> for rec in select * from t order by f2,f2 loop
> ...
> end loop;

>    ->  Seq Scan on t  (cost=0.00..85501.38 rows=4779338 width=28)
>
> I'd like to know a hint about a technicque to avoid the sequential
> scan!

But you're fetching all the rows - what other way would be faster?

--
   Richard Huxton
   Archonet Ltd

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

Предыдущее
От: Vincenzo Romano
Дата:
Сообщение: How to avoid "Seq Scans"?
Следующее
От: "A. Kretschmer"
Дата:
Сообщение: Re: How to avoid "Seq Scans"?