Re: CURSOR slowes down a WHERE clause 100 times?

Поиск
Список
Период
Сортировка
От Niccolo Rigacci
Тема Re: CURSOR slowes down a WHERE clause 100 times?
Дата
Msg-id 20050707074147.GA16360@rigacci.org
обсуждение исходный текст
Ответ на Re: CURSOR slowes down a WHERE clause 100 times?  (John A Meinel <john@arbash-meinel.com>)
Ответы Re: CURSOR slowes down a WHERE clause 100 times?  (Tom Lane <tgl@sss.pgh.pa.us>)
Список pgsql-performance
> >Can the CURSOR on JOIN affects so heavly the WHERE clause? I
> >suspect that - with the CURSOR - a sequential scan is performed
> >on the entire data set for each fetched record...
> >
> >Any idea?
> >
> >
> What does it say if you do "EXPLAIN ANALYZE SELECT..." both with and
> without the cursor?
> It may not say much for the cursor, but I think you can explain analyze
> the fetch statements.

How can I EXPLAIN ANALYZE a cursor like this?

  BEGIN;
  DECLARE mycursor BINARY CURSOR FOR
    SELECT ...
  FETCH ALL IN mycursor;
  END;

I tried to put EXPLAIN ANALYZE in front of the SELECT and in
front of the FETCH, but I got two "syntax error"...

Thanks

--
Niccolo Rigacci
Firenze - Italy

War against Iraq? Not in my name!

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

Предыдущее
От: Josh Berkus
Дата:
Сообщение: Re: Data Warehousing Tuning
Следующее
От: Niccolo Rigacci
Дата:
Сообщение: Re: CURSOR slowes down a WHERE clause 100 times?