Re: getting the ranks out of items with SHARED

Поиск
Список
Период
Сортировка
От Tom Lane
Тема Re: getting the ranks out of items with SHARED
Дата
Msg-id 27411.1121261755@sss.pgh.pa.us
обсуждение исходный текст
Ответ на Re: getting the ranks out of items with SHARED  (Janning Vygen <vygen@gmx.de>)
Ответы Re: getting the ranks out of items with SHARED  (Janning Vygen <vygen@planwerk6.de>)
Список pgsql-general
Janning Vygen <vygen@gmx.de> writes:
> this way it works:

> CREATE TEMP TABLE ranking AS *Q*;
> EXECUTE 'UPDATE temp_gc SET gc_rank = ranking.rank
> FROM ranking WHERE temp_gc.mg_name = ranking.mg_name;';

> and this way it doesn't:

> UPDATE temp_gc
> SET gc_rank = ranking.rank
> FROM (*Q*)
> ranking
> WHERE temp_gc.mg_name = ranking.mg_name;

It's difficult to be sure without looking at EXPLAIN output, but I would
guess that the second query is being done with a plan that involves
multiple scans of "*Q*", and that's confusing your function.

            regards, tom lane

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

Предыдущее
От: Michael Fuhr
Дата:
Сообщение: Re: Strange memory behaviour with PGreset() ...
Следующее
От: Gnanavel S
Дата:
Сообщение: Re: INSERT INTO from a SELECT query