Re: Reproducing incorrect order with order by in a subquery - Mailing list pgsql-general

From Karsten Hilbert
Subject Re: Reproducing incorrect order with order by in a subquery
Date
Msg-id ZItVUvAFtq75Ts7o@hermes.hilbert.loc
Whole thread Raw
In response to Re: Reproducing incorrect order with order by in a subquery  (Ruslan Zakirov <ruslan.zakirov@gmail.com>)
List pgsql-general
Am Thu, Jun 15, 2023 at 12:58:55AM +0300 schrieb Ruslan Zakirov:

e.g.

> https://mariadb.com/kb/en/why-is-order-by-in-a-from-subquery-ignored/

...

> My goal was to find a small dataset that demonstrates this ordering
> mismatch.

I attempted to think it through whether it is even *possible*
to find a dataset (of any size) which *reliably* demonstrates
the ordering mismatch.

To my understanding -- since the outer query *can* (per
happenstance) return rows in the order of the subquery's
ORDER BY it is not possible to reliably demonstrate that it
won't, is it ?

Karsten
--
GPG  40BE 5B0E C98E 1713 AFA6  5BC0 3BEA AC80 7D4F C89B



pgsql-general by date:

Previous
From: Ruslan Zakirov
Date:
Subject: Re: Helping planner to chose sequential scan when it improves performance
Next
From: "Brainmue"
Date:
Subject: Question: Multiple pg clusters on one server can be reached with the standard port.