Re: query planning different in plpgsql?

Поиск
Список
Период
Сортировка
Искать
От
Michal J. Kubski
Тема
Re: query planning different in plpgsql?
Дата
Msg-id
0ddf8c22989a34dc924fef1897bdc8d7@localhost
Ответ на
Список
Дерево обсуждения
query planning different in plpgsql? Michal J. Kubski <michal.kubski@cdt.pl>
Re: query planning different in plpgsql? Scott Carey <scott@richrelevance.com>
Re: query planning different in plpgsql? Scott Mead <scott.lists@enterprisedb.com>
Re: query planning different in plpgsql? Tom Lane <tgl@sss.pgh.pa.us>
Re: query planning different in plpgsql? Grzegorz Jaśkiewicz <gryzman@gmail.com>
Re: query planning different in plpgsql? Michal J. Kubski <michal.kubski@cdt.pl>
Re: query planning different in plpgsql? Merlin Moncure <mmoncure@gmail.com>
Re: query planning different in plpgsql? Michal J. Kubski <michal.kubski@cdt.pl>
Re: query planning different in plpgsql? Tom Lane <tgl@sss.pgh.pa.us>
Re: query planning different in plpgsql? "Michal J. Kubski" <michal.kubski@cdt.pl>
Re: query planning different in plpgsql? Waldomiro <waldomiro@shx.com.br>


Hi,

On Fri, 23 Oct 2009 16:56:36 +0100, Grzegorz Jaśkiewicz
 wrote:
> On Fri, Oct 23, 2009 at 4:49 PM, Scott Mead
> wrote:
> 
>>
>>
>>   Do you not have an index on last_snapshot.domain_id?
>>
> 
> that, and also try rewriting a query as JOIN. There might be difference
in
> performance/plan.
> 
Thanks, it runs better (average 240s, not 700s) with the index. Rewriting
queries
as JOINs does not make any difference.
The last_snapshot is a temp table created earlier in the procedure
and the query in question is preceded with CREATE TEMPORARY TABLE as well,
not a cursor. 
I still do not get why it performs differently inside the procedure. 
Is there any way to see what planning decisions were made?

Best regards,
Michal

-- 
I hear and I forget. I see and I believe. I do and I understand.
(Confucius)

В списке pgsql-performance по дате отправления
От: Marc Mamin
Дата:
От: Merlin Moncure
Дата:
FAQ