Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtp (Exim 4.80) (envelope-from ) id 1WXe1e-0008Nc-9n for pgsql-hackers@arkaria.postgresql.org; Tue, 08 Apr 2014 21:57:50 +0000 Received: from localhost ([127.0.0.1] helo=postgresql.org) by malur.postgresql.org with smtp (Exim 4.80) (envelope-from ) id 1WXe1d-00035n-QB for pgsql-hackers@arkaria.postgresql.org; Tue, 08 Apr 2014 21:57:49 +0000 Received: from magus.postgresql.org ([2a02:c0:301:0:ffff::29]) by malur.postgresql.org with esmtp (Exim 4.80) (envelope-from ) id 1WXe1c-00035e-Kt for pgsql-hackers@postgresql.org; Tue, 08 Apr 2014 21:57:48 +0000 Received: from mail-ob0-f179.google.com ([209.85.214.179]) by magus.postgresql.org with esmtp (Exim 4.80) (envelope-from ) id 1WXe1a-0000YT-86 for pgsql-hackers@postgresql.org; Tue, 08 Apr 2014 21:57:48 +0000 Received: by mail-ob0-f179.google.com with SMTP id va2so1773399obc.10 for ; Tue, 08 Apr 2014 14:57:44 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:mime-version:in-reply-to:references:date :message-id:subject:from:to:cc:content-type; bh=3V4CeuQY5kd/6QTnAkZjM5yqdMhsBJZcvd5FCKA3/Qs=; b=UCthU1igCbXr8NlNijetNnC/MAqjZArQ0iMPSaI8QN7s90wGEcXzFOeuYAvWSgsSww Eawr/KfBx/z1Ex3GJmDBXHTMIruq2xho8laClGoVSA0734MwcssW1EUJoS7q2Cwi2eL6 4OH3S+6d6F47zaywob/0HBkam5wZfNi42gwR3K1JJzktNBehCs/u9hOoxereR1RTOME4 YfCngvb8Awr12Dc0GwP3j1VT5rZ2MPnyL5hSj8xHE0J9KKi/owdqqigi0B2K/FIvkgZz aDKQyabBelVfqGlKgLsaQ/ah+O3EHOHIj7HKG+bCL4SX8MvRSDfGGxzWzP8jAzD4pmVO WiIQ== X-Gm-Message-State: ALoCoQmQu1zLGWrAyVQ9Tq1A5Ri/3lkpA1Tpe4FMv8+NuELG5k4W/dloCIZJh+/hYH2Wz+6ChNyp MIME-Version: 1.0 X-Received: by 10.182.112.231 with SMTP id it7mr5390246obb.8.1396994264757; Tue, 08 Apr 2014 14:57:44 -0700 (PDT) Received: by 10.182.233.228 with HTTP; Tue, 8 Apr 2014 14:57:44 -0700 (PDT) In-Reply-To: <29030.1396993582@sss.pgh.pa.us> References: <27299.1396989666@sss.pgh.pa.us> <28589.1396992841@sss.pgh.pa.us> <29030.1396993582@sss.pgh.pa.us> Date: Tue, 8 Apr 2014 14:57:44 -0700 Message-ID: Subject: Re: default opclass for jsonb (was Re: Call for GIST/GIN/SP-GIST opclass documentation) From: Peter Geoghegan To: Tom Lane Cc: pgsql-hackers@postgresql.org Content-Type: text/plain; charset=UTF-8 X-Pg-Spam-Score: -2.6 (--) 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 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. -- Peter Geoghegan -- Sent via pgsql-hackers mailing list (pgsql-hackers@postgresql.org) To make changes to your subscription: http://www.postgresql.org/mailpref/pgsql-hackers