Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtp (Exim 4.80) (envelope-from ) id 1a0uxR-00056c-KB for pgsql-sql@arkaria.postgresql.org; Mon, 23 Nov 2015 17:31:17 +0000 Received: from localhost ([127.0.0.1] helo=postgresql.org) by malur.postgresql.org with smtp (Exim 4.84) (envelope-from ) id 1a0uxR-0005YN-1M for pgsql-sql@arkaria.postgresql.org; Mon, 23 Nov 2015 17:31:17 +0000 Received: from makus.postgresql.org ([2001:4800:1501:1::229]) by malur.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA384:256) (Exim 4.84) (envelope-from ) id 1a0uxQ-0005XX-3W for pgsql-sql@postgresql.org; Mon, 23 Nov 2015 17:31:16 +0000 Received: from mailout01.ims-firmen.de ([213.174.32.96]) by makus.postgresql.org with esmtps (TLS1.0:DHE_RSA_AES_256_CBC_SHA1:256) (Exim 4.84) (envelope-from ) id 1a0uxN-0004qD-Ad for pgsql-sql@postgresql.org; Mon, 23 Nov 2015 17:31:14 +0000 Received: from mailin04.ims-firmen.de ([192.168.1.144]) by mailout01.ims-firmen.de with esmtp (envelope-from ) id 1a0uxK-0006q9-h1 for pgsql-sql@postgresql.org; Mon, 23 Nov 2015 18:31:10 +0100 Received: from [213.174.32.254] (helo=a-kretschmer.de) by mailin04.ims-firmen.de with esmtpsa (TLSv1:AES256-SHA:256) (envelope-from ) id 1a0uxK-0003KL-AK for pgsql-sql@postgresql.org; Mon, 23 Nov 2015 18:31:10 +0100 Received: from kretschmer by a-kretschmer.de with local (Exim 4.69) (envelope-from ) id 1a0uxJ-0002OK-LI for pgsql-sql@postgresql.org; Mon, 23 Nov 2015 18:31:09 +0100 Date: Mon, 23 Nov 2015 18:31:09 +0100 From: Andreas Kretschmer To: "pgsql-sql@postgresql.org" Subject: Re: Select values by interval Message-ID: <20151123173109.GA8959@tux> References: <20151123172216.GA5760@tux> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline Content-Transfer-Encoding: 8bit In-Reply-To: X-OS: Debian/GNU Linux - weil ich es mir Wert bin! X-GPG-Fingerprint: EE16 3C01 7B9C 10F7 2C8B 3B86 4DB3 D9EE 7F45 84DA X-Message-Flag: "Windows" is not the answer. "Windows" is the question and the answer is "no"! X-Lugdd: Gerd Kube X-Info: My name is root. Just root. And I am licensed to kill -9 User-Agent: Mutt/1.5.18 (2008-05-17) X-Pg-Spam-Score: -2.6 (--) List-Archive: List-Help: List-ID: List-Owner: List-Post: List-Subscribe: List-Unsubscribe: X-Mailing-List: pgsql-sql Precedence: bulk Sender: pgsql-sql-owner@postgresql.org David G. Johnston wrote: > > ​Unproven but whenever you have a query of this form (row_number = 1) you > should consider/test whether using DISTINCT ON with an appropriate ORDER BY > clause gives you the answer faster and/or more clearly. Nice hint. Andreas -- Really, I'm not out to destroy Microsoft. That will just be a completely unintentional side effect. (Linus Torvalds) "If I was god, I would recompile penguin with --enable-fly." (unknown) Kaufbach, Saxony, Germany, Europe. N 51.05082°, E 13.56889° -- Sent via pgsql-sql mailing list (pgsql-sql@postgresql.org) To make changes to your subscription: http://www.postgresql.org/mailpref/pgsql-sql