Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtp (Exim 4.80) (envelope-from ) id 1Xy5lt-0002Ir-TB for pgsql-performance@arkaria.postgresql.org; Mon, 08 Dec 2014 21:23:10 +0000 Received: from localhost ([127.0.0.1] helo=postgresql.org) by malur.postgresql.org with smtp (Exim 4.80) (envelope-from ) id 1Xy5lt-0003TG-8t for pgsql-performance@arkaria.postgresql.org; Mon, 08 Dec 2014 21:23:09 +0000 Received: from magus.postgresql.org ([2a02:c0:301:0:ffff::29]) by malur.postgresql.org with esmtps (TLS1.2:DHE_RSA_AES_256_CBC_SHA256:256) (Exim 4.80) (envelope-from ) id 1Xy5ls-0003Sj-78; Mon, 08 Dec 2014 21:23:08 +0000 Received: from sss.pgh.pa.us ([66.207.139.130]) by magus.postgresql.org with esmtps (TLS1.2:DHE_RSA_AES_256_CBC_SHA256:256) (Exim 4.80) (envelope-from ) id 1Xy5lk-00079z-QW; Mon, 08 Dec 2014 21:23:07 +0000 Received: from sss1.sss.pgh.pa.us (localhost [127.0.0.1]) by sss.pgh.pa.us (8.14.4/8.14.4) with ESMTP id sB8LMuXH004747; Mon, 8 Dec 2014 16:22:56 -0500 From: Tom Lane To: Adrian Klaver cc: Tim Dudgeon , pgsql-sql@postgresql.org, pgsql-performance@postgresql.org Subject: Re: [SQL] querying with index on jsonb slower than standard column. Why? In-reply-to: <548614C8.90203@aklaver.com> References: <5484DBDA.6090405@gmail.com> <5484EEA7.1030403@aklaver.com> <5484F437.2080402@gmail.com> <16147.1418002090@sss.pgh.pa.us> <5485C449.4020204@aklaver.com> <26002.1418053572@sss.pgh.pa.us> <5485C8BA.7040704@aklaver.com> <5485D584.8080105@aklaver.com> <27877.1418057764@sss.pgh.pa.us> <3936.1418071989@sss.pgh.pa.us> <548614C8.90203@aklaver.com> Comments: In-reply-to Adrian Klaver message dated "Mon, 08 Dec 2014 13:14:48 -0800" Date: Mon, 08 Dec 2014 16:22:56 -0500 Message-ID: <4746.1418073776@sss.pgh.pa.us> X-Pg-Spam-Score: -1.9 (-) 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 Adrian Klaver writes: > I redid the test on my 32-bit machine, setting work_mem=16MB, and I got > comparable results to what I saw on the 64-bit machine. So, what I am > still am puzzled by is why work_mem seems to make the two paths > equivalent in time?: If work_mem is large enough that we never have to go through tbm_lossify(), then the recheck condition will never be executed, so its speed doesn't matter. (So the near-term workaround for Tim is to raise work_mem when working with tables of this size.) regards, tom lane -- Sent via pgsql-performance mailing list (pgsql-performance@postgresql.org) To make changes to your subscription: http://www.postgresql.org/mailpref/pgsql-performance