Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtp (Exim 4.80) (envelope-from ) id 1Xy5xA-0002iK-SR for pgsql-sql@arkaria.postgresql.org; Mon, 08 Dec 2014 21:34:48 +0000 Received: from localhost ([127.0.0.1] helo=postgresql.org) by malur.postgresql.org with smtp (Exim 4.80) (envelope-from ) id 1Xy5xA-000892-8c for pgsql-sql@arkaria.postgresql.org; Mon, 08 Dec 2014 21:34:48 +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 1Xy5x9-00088h-61 for pgsql-sql@postgresql.org; Mon, 08 Dec 2014 21:34:47 +0000 Received: from out3-smtp.messagingengine.com ([66.111.4.27]) by magus.postgresql.org with esmtps (TLS1.2:DHE_RSA_AES_256_CBC_SHA256:256) (Exim 4.80) (envelope-from ) id 1Xy5x4-0007Lj-6k for pgsql-sql@postgresql.org; Mon, 08 Dec 2014 21:34:45 +0000 Received: from compute3.internal (compute3.nyi.internal [10.202.2.43]) by mailout.nyi.internal (Postfix) with ESMTP id ECE7520EA5 for ; Mon, 8 Dec 2014 16:34:39 -0500 (EST) Received: from frontend1 ([10.202.2.160]) by compute3.internal (MEProxy); Mon, 08 Dec 2014 16:34:39 -0500 DKIM-Signature: v=1; a=rsa-sha1; c=relaxed/relaxed; d=aklaver.com; h= x-sasl-enc:message-id:date:from:mime-version:to:cc:subject :references:in-reply-to:content-type:content-transfer-encoding; s=mesmtp; bh=huPNsdLA59pDkOLNAHK5UBBg//8=; b=QMk0yF8M2TpznL4L6Z /evKoNJsmlL30NYq/Qc2MXMEMG/EgMMp9k+N1awji88mrVmD4SH+TP6Fl9W7+oQf y42Thz+BSLO9VQgMOxsEk2vL9gLey6EdNVwuEquNuawmlEmGZI0KqUpuQcgCnfC2 BWiAgHLm/A20bflLciQ6Tpx9c= DKIM-Signature: v=1; a=rsa-sha1; c=relaxed/relaxed; d= messagingengine.com; h=x-sasl-enc:message-id:date:from :mime-version:to:cc:subject:references:in-reply-to:content-type :content-transfer-encoding; s=smtpout; bh=huPNsdLA59pDkOLNAHK5UB Bg//8=; b=OZ3XRBYsb/kLRkhBeiat/8oaIVluTAxVQT6eKV4Jh+s8JTxdpinsZc 1SVF3n1JdbJOnVaZL880i9NaCogivVuF1zsD4xEoE/LaBVQS2Di+1d2dM00Uoycg 2PoK6MZnyE4+yhKXY5lsgLvm9b+UeTtJ79paXa8sS5DyjPeEY8K/s= X-Sasl-enc: BwEsT0f26JodqEdLOJ4ijqYDocM3IYP85w7XN4on4PeT 1418074479 Received: from [192.168.1.4] (unknown [174.21.85.155]) by mail.messagingengine.com (Postfix) with ESMTPA id 41661C00281; Mon, 8 Dec 2014 16:34:39 -0500 (EST) Message-ID: <5486196E.4080602@aklaver.com> Date: Mon, 08 Dec 2014 13:34:38 -0800 From: Adrian Klaver User-Agent: Mozilla/5.0 (X11; Linux i686; rv:31.0) Gecko/20100101 Thunderbird/31.3.0 MIME-Version: 1.0 To: Tom Lane CC: Tim Dudgeon , pgsql-sql@postgresql.org, pgsql-performance@postgresql.org Subject: Re: querying with index on jsonb slower than standard column. Why? 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> <4746.1418073776@sss.pgh.pa.us> In-Reply-To: <4746.1418073776@sss.pgh.pa.us> Content-Type: text/plain; charset=windows-1252; format=flowed Content-Transfer-Encoding: 7bit X-Pg-Spam-Score: -2.7 (--) 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 On 12/08/2014 01:22 PM, Tom Lane wrote: > 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. Aah, peeking into tidbitmap.c is enlightening. Thanks. > > (So the near-term workaround for Tim is to raise work_mem when > working with tables of this size.) > > regards, tom lane > > -- Adrian Klaver adrian.klaver@aklaver.com -- Sent via pgsql-sql mailing list (pgsql-sql@postgresql.org) To make changes to your subscription: http://www.postgresql.org/mailpref/pgsql-sql