Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtp (Exim 4.80) (envelope-from ) id 1WXeLv-0000Zu-VO for pgsql-hackers@arkaria.postgresql.org; Tue, 08 Apr 2014 22:18:48 +0000 Received: from localhost ([127.0.0.1] helo=postgresql.org) by malur.postgresql.org with smtp (Exim 4.80) (envelope-from ) id 1WXeLv-0003Rs-FK for pgsql-hackers@arkaria.postgresql.org; Tue, 08 Apr 2014 22:18:47 +0000 Received: from makus.postgresql.org ([2001:4800:7903:4::125]) by malur.postgresql.org with esmtp (Exim 4.80) (envelope-from ) id 1WXeLu-0003Rk-7I for pgsql-hackers@postgresql.org; Tue, 08 Apr 2014 22:18:46 +0000 Received: from relay3-d.mail.gandi.net ([2001:4b98:c:538::195]) by makus.postgresql.org with esmtp (Exim 4.80) (envelope-from ) id 1WXeLm-0006Ue-SJ for pgsql-hackers@postgresql.org; Tue, 08 Apr 2014 22:18:45 +0000 Received: from mfilter7-d.gandi.net (mfilter7-d.gandi.net [217.70.178.136]) by relay3-d.mail.gandi.net (Postfix) with ESMTP id DE41AA80B5; Wed, 9 Apr 2014 00:18:35 +0200 (CEST) X-Virus-Scanned: Debian amavisd-new at mfilter7-d.gandi.net Received: from relay3-d.mail.gandi.net ([217.70.183.195]) by mfilter7-d.gandi.net (mfilter7-d.gandi.net [10.0.15.180]) (amavisd-new, port 10024) with ESMTP id buRprOzD3al9; Wed, 9 Apr 2014 00:18:34 +0200 (CEST) X-Originating-IP: 98.27.58.255 Received: from [192.168.10.146] (cpe-098-027-058-255.nc.res.rr.com [98.27.58.255]) (Authenticated sender: adsend@dunslane.net) by relay3-d.mail.gandi.net (Postfix) with ESMTPSA id 5B218A80B9; Wed, 9 Apr 2014 00:18:32 +0200 (CEST) Message-ID: <534475B7.6020908@dunslane.net> Date: Tue, 08 Apr 2014 18:18:31 -0400 From: Andrew Dunstan User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:17.0) Gecko/20130110 Thunderbird/17.0.2 MIME-Version: 1.0 To: Peter Geoghegan CC: Tom Lane , pgsql-hackers@postgresql.org Subject: Re: default opclass for jsonb (was Re: Call for GIST/GIN/SP-GIST opclass documentation) References: <27299.1396989666@sss.pgh.pa.us> <28589.1396992841@sss.pgh.pa.us> <29030.1396993582@sss.pgh.pa.us> In-Reply-To: Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit X-Pg-Spam-Score: -1.9 (-) List-Archive: List-Help: List-ID: List-Owner: List-Post: List-Subscribe: List-Unsubscribe: X-Mailing-List: pgsql-hackers Precedence: bulk Sender: pgsql-hackers-owner@postgresql.org On 04/08/2014 05:57 PM, Peter Geoghegan wrote: > On Tue, Apr 8, 2014 at 2:46 PM, Tom Lane wrote: >> Well, let me see if I understand the situation correctly: >> >> * jsonb_ops supports more operators >> >> * jsonb_hash_ops produces smaller, better-performing indexes >> >> * jsonb_ops falls over on inputs with wide field values, but >> jsonb_hash_ops does not > There might be some compelling cases for indexing existence rather > than containment, since the recheck flag isn't set there, but in > general this summary seems sound. I would say that broadly, existence > is a less useful operator than containment, and so jsonb_hash_ops is > broadly more compelling. I didn't propose changing the default due to > concerns about the POLA, but I'm happy to be told that those concerns > were out of proportion to the practical benefits of a different > default. > I tend to agree with Tom that POLA will be more violated by the default ops class not being able to index some values. cheers andrew -- Sent via pgsql-hackers mailing list (pgsql-hackers@postgresql.org) To make changes to your subscription: http://www.postgresql.org/mailpref/pgsql-hackers