From: | Adrian Klaver <adrian(dot)klaver(at)gmail(dot)com> |
---|---|
To: | pgsql-general(at)postgresql(dot)org |
Cc: | Sim Zacks <sim(at)compulab(dot)co(dot)il> |
Subject: | Re: update with from |
Date: | 2012-01-23 15:13:10 |
Message-ID: | 201201230713.10750.adrian.klaver@gmail.com |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-general |
On Monday, January 23, 2012 2:00:29 am Sim Zacks wrote:
> Postgresql 8.2
>
> I want to update a table with a from that has mutliple rows joining to
> it. According to the docs, this is not advisable because:
> "If it does, then only one of the join rows will be used to update the
> target row, but which one will be used is not readily predictable."
>
> In my tests, if the joined rows are sorted it always updates with the
> first row. Does anyone have any other experiences, or should I be
> concerned that at some point it will behave differently?
>
> The performance is currently unacceptable when changing the from to only
> join to one row makes
I guess the primary question here is, what are you trying to achieve?
Do want a particular row to supply the values to the target table i.e the row
with the most timestamp?
What is the query you are using?
>
>
> Thanks
> Sim
--
Adrian Klaver
adrian(dot)klaver(at)gmail(dot)com
From | Date | Subject | |
---|---|---|---|
Next Message | Sim Zacks | 2012-01-23 15:21:24 | Re: update with from |
Previous Message | Stuart Bishop | 2012-01-23 15:13:00 | Re: Is Synchronous Postgresql Replication Slower Than Asynchronous? |