From: David G. Johnston <david.g.johnston@gmail.com>
To: Boyko Yordanov <b.yordanov2@gmail.com>
Cc: pgsql-bugs@postgresql.org <pgsql-bugs@postgresql.org>
Subject: Re: BUG #14020: row_number() over(partition by order by) - weird behavior
Date: Tue, 15 Mar 2016 08:13:31 -0700
Message-ID: <CAKFQuwYpQJsLWBPRoR8+tA72aCUoV8cKX6eiN5dkSLeAtSWMTg@mail.gmail.com> (raw)
In-Reply-To: <5BD57C5B-14E8-4472-96B5-EB5CBB35854F@gmail.com>
References: <20160314204348.8902.26168@wrigleys.postgresql.org>
<CAKFQuwbWiSwSf42hd-h9MgU9CSicnurxv7sY607Uw1D6dLMW9g@mail.gmail.com>
<926E6EDE-8959-4209-B3F0-E894987FD4E0@gmail.com>
<5BD57C5B-14E8-4472-96B5-EB5CBB35854F@gmail.com>
List-Unsubscribe: <mailto:majordomo@postgresql.org?body=unsub%20pgsql-bugs>
On Tue, Mar 15, 2016 at 2:04 AM, Boyko Yordanov <b.yordanov2@gmail.com>
wrote:
> Thinking further on this, I now got your point on the “duplicate
> grossprices is ordered randomly” suggestion.
>
> What I missed to realize is that the update query updates *every* product
> partition that has reordered due to duplicate grossprice being ordered
> randomly, resulting in thousands of updates instead of just < 148 (or < 99
> in the case of product = 2 partition).
>
> Is there a way to ensure persistence of “over(order by duplicate_columns)”
> ordering, except for ordering by a second (or even third) column?
>
>
No, you need to have enough columns for deterministic order.
Dave
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Reply to all the recipients from your mail client; the link fills in
the headers below: reply via email
Some clients, webmail especially, drop In-Reply-To and References from
a link, and the reply then starts a new thread: use the mbox below.
To: pgsql-bugs@postgresql.org
Cc: david.g.johnston@gmail.com, b.yordanov2@gmail.com
Subject: Re: BUG #14020: row_number() over(partition by order by) - weird behavior
In-Reply-To: <CAKFQuwYpQJsLWBPRoR8+tA72aCUoV8cKX6eiN5dkSLeAtSWMTg@mail.gmail.com>
References: <20160314204348.8902.26168@wrigleys.postgresql.org> <CAKFQuwbWiSwSf42hd-h9MgU9CSicnurxv7sY607Uw1D6dLMW9g@mail.gmail.com> <926E6EDE-8959-4209-B3F0-E894987FD4E0@gmail.com> <5BD57C5B-14E8-4472-96B5-EB5CBB35854F@gmail.com> <CAKFQuwYpQJsLWBPRoR8+tA72aCUoV8cKX6eiN5dkSLeAtSWMTg@mail.gmail.com>
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox