Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtp (Exim 4.72) (envelope-from ) id 1UIpUQ-00083N-0J for pgsql-performance@arkaria.postgresql.org; Fri, 22 Mar 2013 00:05:46 +0000 Received: from localhost ([127.0.0.1] helo=postgresql.org) by malur.postgresql.org with smtp (Exim 4.72) (envelope-from ) id 1UIpUP-00022D-Fw for pgsql-performance@arkaria.postgresql.org; Fri, 22 Mar 2013 00:05:45 +0000 Received: from makus.postgresql.org ([2001:4800:7903:4::125]) by malur.postgresql.org with esmtp (Exim 4.72) (envelope-from ) id 1UIpUN-000225-Bn for pgsql-performance@postgresql.org; Fri, 22 Mar 2013 00:05:43 +0000 Received: from outmail148187.authsmtp.co.uk ([62.13.148.187]) by makus.postgresql.org with esmtp (Exim 4.72) (envelope-from ) id 1UIpUI-0001Kp-At for pgsql-performance@postgresql.org; Fri, 22 Mar 2013 00:05:42 +0000 Received: from mail-c233.authsmtp.com (mail-c233.authsmtp.com [62.13.128.233]) by punt6.authsmtp.com (8.14.2/8.14.2/Kp) with ESMTP id r2M05aSx033443; Fri, 22 Mar 2013 00:05:36 GMT Received: from [172.47.23.103] (70-36-143-10.dsl.dynamic.sonic.net [70.36.143.10]) (authenticated bits=0) by mail.authsmtp.com (8.14.2/8.14.2/) with ESMTP id r2M05WQl088827; Fri, 22 Mar 2013 00:05:33 GMT Message-ID: <514BA04B.3040609@agliodbs.com> Date: Thu, 21 Mar 2013 17:05:31 -0700 From: Josh Berkus Organization: PostgreSQL Experts Inc. User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:17.0) Gecko/20130308 Thunderbird/17.0.4 MIME-Version: 1.0 To: Tom Lane CC: "pgsql-performance@postgresql.org" , Jeff Davis Subject: Re: Index usage for tstzrange? References: <514A5088.6060101@agliodbs.com> <1326.1363838330@sss.pgh.pa.us> In-Reply-To: <1326.1363838330@sss.pgh.pa.us> X-Enigmail-Version: 1.5.1 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 7bit X-Server-Quench: 37765c9f-9284-11e2-a49c-0025907707a1 X-AuthReport-Spam: If SPAM / abuse - report it at: http://www.authsmtp.com/abuse X-AuthRoute: OCdyZgscClZXSx8a IioLCC5HRQ8+YBZL BAkGMA9GIUINWEQK c1AAdB12OUdbHwkA AHYLW15UVVdyWi1y axRSaxtcZklQXgV1 UktWQhwQFnhoBHtg Wh4WWhFwcEtEcXZ1 K0VlWXZeD00saE9/ SkpJFGxTZ3oxbGlM TUBYdQZdcARNfhgU ax4dAXkdCgVyBAwf JSoGdxE3MThPYDlO Sw4AZVwVWw4XBSIu XRkEEjh4dQAA X-Authentic-SMTP: 61633136333939.1021:706 X-AuthFastPath: 0 (Was 255) X-AuthSMTP-Origin: 70.36.143.10/23 X-AuthVirus-Status: No virus detected - but ensure you scan with your own anti-virus system. X-Pg-Spam-Score: -2.6 (--) List-Archive: List-Help: List-ID: List-Owner: List-Post: List-Subscribe: List-Unsubscribe: X-Mailing-List: pgsql-performance Precedence: bulk Sender: pgsql-performance-owner@postgresql.org > Well, no. <@ is not a btree-indexable operator. Yes, but it's equivalent to ( ( a >= b1 or b1 is null ) and ( a < b2 or b2 is null ) ), which *is* btree-indexable and can use an index. So it seems like the kind of optimization we could eventually make. -- Josh Berkus PostgreSQL Experts Inc. http://pgexperts.com -- Sent via pgsql-performance mailing list (pgsql-performance@postgresql.org) To make changes to your subscription: http://www.postgresql.org/mailpref/pgsql-performance