Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtps (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1jpw0v-0007OC-Jk for pgsql-sql@arkaria.postgresql.org; Mon, 29 Jun 2020 15:48:09 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.92) (envelope-from ) id 1jpw0u-0006E1-8P for pgsql-sql@arkaria.postgresql.org; Mon, 29 Jun 2020 15:48:08 +0000 Received: from magus.postgresql.org ([2a02:c0:301:0:ffff::29]) by malur.postgresql.org with esmtps (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1jpw0u-0006Cx-1p for pgsql-sql@lists.postgresql.org; Mon, 29 Jun 2020 15:48:08 +0000 Received: from momjian.us ([72.94.173.45]) by magus.postgresql.org with esmtps (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1jpw0r-00062K-DW for pgsql-sql@lists.postgresql.org; Mon, 29 Jun 2020 15:48:07 +0000 Received: from bruce by momjian.us with local (Exim 4.92) (envelope-from ) id 1jpw0n-00058b-2w; Mon, 29 Jun 2020 11:48:01 -0400 Date: Mon, 29 Jun 2020 11:48:01 -0400 From: Bruce Momjian To: Erik Brandsberg Cc: Tom Lane , Martin Handsteiner , Simon Riggs , "pgsql-sql@lists.postgresql.org" Subject: Re: AW: Optimizer Hint, to ignore limit and offset in optimizer plan Message-ID: <20200629154801.GA17530@momjian.us> References: <323666.1593441019@sss.pgh.pa.us> MIME-Version: 1.0 Content-Type: text/plain; charset=iso-8859-1 Content-Disposition: inline Content-Transfer-Encoding: 8bit In-Reply-To: User-Agent: Mutt/1.10.1 (2018-07-13) List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Precedence: bulk On Mon, Jun 29, 2020 at 10:33:43AM -0400, Erik Brandsberg wrote: > New request:  If order by is not specified with an order by clause, allow an > option to be set that explicitly randomizes the results to break everything > that relies on the order.  :)  This would primarily be used for QA work to find > code that depends on an undefined order. You mean LIMIT/OFFSET without ORDER BY? I think issuing a warning, perhaps when some "novice" mode is enabled, would work well. -- Bruce Momjian https://momjian.us EnterpriseDB https://enterprisedb.com The usefulness of a cup is in its emptiness, Bruce Lee