Re: Re: pg_dump and LOs (another proposal)

Поиск
Список
Период
Сортировка
От Tom Lane
Тема Re: Re: pg_dump and LOs (another proposal)
Дата
Msg-id 27677.962865176@sss.pgh.pa.us
обсуждение исходный текст
Ответ на Re: Re: pg_dump and LOs (another proposal)  (Philip Warner <pjw@rhyme.com.au>)
Список pgsql-hackers
Philip Warner <pjw@rhyme.com.au> writes:
> At 13:06 5/07/00 -0400, Tom Lane wrote:
>> UPDATE userTable SET oidcolumn = tmptable.newLOoid WHERE
>> oidcolumn = tmptable.oldLOoid;

> It's actually nastier than this since there could be multiple oid columns,
> implying, potentially, multiple scans of the table.

So?

> I suppose

> update userTable set
>     oidCol1 = Coalesce( (Select newLOoid from oidxref where oldLOoid = oidCol1
> ), oidCol1 ),
>     oidCol2 = Coalesce( (Select newLOoid from oidxref where oldLOoid = oidCol2
> ), oidCol2 ),
>     ...

> would work, or at least only update each row once, but it looks slow.

Almost certainly slower than processing each column in a separate
UPDATE.  It does not pay to try to be smarter than the planner is ;-)
        regards, tom lane


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

Предыдущее
От: Tom Lane
Дата:
Сообщение: Re: Array type confusion
Следующее
От: Philip Warner
Дата:
Сообщение: Re: Re: zlib for pg_dump