Re: Fwd: Tricky join and update with same table

Поиск
Список
Период
Сортировка
От Luca Ferrari
Тема Re: Fwd: Tricky join and update with same table
Дата
Msg-id CAKoxK+6RgG22mh2z0=5NHSdii8hL06HQ4=RWpdGErvPCzJT8-A@mail.gmail.com
обсуждение исходный текст
Ответ на Re: Fwd: Tricky join and update with same table  (James David Smith <james.david.smith@gmail.com>)
Ответы Re: Fwd: Tricky join and update with same table  (James David Smith <james.david.smith@gmail.com>)
Список pgsql-novice
On Fri, Jul 26, 2013 at 4:36 PM, James David Smith
<james.david.smith@gmail.com> wrote:
> Luca sent me an email a short while ago with some code to try however, and
> I'm doing that at the moment. Though it's been running for about 30 minutes
> now and isn't done. Though there are 230,000 rows, so perhaps that isn't
> that surprising after all. Here it is for posterity:
>

Ops...I was supposed to hit the "reply all" button!
Supposing it is working for you, you can at least split the update
into chunks insering a condition on the main query to update only rows
within a certain date range (let's say the most recent ones). That
will tell you if the query is working properly.
That is als the reason why I suggested using a trigger for further
inserts: I was suppsoing you had a lot of data and therefore doing an
update of chunks when the data is inserted does not make you have to
run a very long query.

Luca


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

Предыдущее
От: Michael Swierczek
Дата:
Сообщение: Re: Fwd: Tricky join and update with same table
Следующее
От: Francisco Leovey
Дата:
Сообщение: Using wildcard for table name ?