agora inbox for pgsql-sql@postgresql.org  
help / color / mirror / Atom feed
From: Tom Lane <tgl@sss.pgh.pa.us>
To: Adrian Klaver <adrian.klaver@aklaver.com>
Cc: Tim Dudgeon <tdudgeon.ml@gmail.com>
Cc: pgsql-sql@postgresql.org
Subject: Re: querying with index on jsonb slower than standard column. Why?
Date: Mon, 08 Dec 2014 11:56:04 -0500
Message-ID: <27877.1418057764@sss.pgh.pa.us> (raw)
In-Reply-To: <5485D584.8080105@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>
List-Unsubscribe: <mailto:majordomo@postgresql.org?body=unsub%20pgsql-sql>

Adrian Klaver <adrian.klaver@aklaver.com> writes:
> Seems work_mem is the key:

Fascinating.  So there's some bad behavior in the lossy-bitmap stuff
that's exposed by one case but not the other.  The set of heap rows we
actually need to examine is presumably identical in both cases.  The
only idea that comes to mind is that the order in which the TIDs get
inserted into the bitmaps might be entirely different between the two
index types.  We might have to write it off as bad luck, if the
lossification algorithm doesn't have enough information to do better;
but it seems worth looking into.

			regards, tom lane


-- 
Sent via pgsql-sql mailing list (pgsql-sql@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-sql



view thread (24+ messages)  latest in thread

Message-ID: <27877.1418057764@sss.pgh.pa.us>
Permalink:  ../27877.1418057764@sss.pgh.pa.us/
Also on:    postgresql.org/message-id/27877.1418057764@sss.pgh.pa.us

reply

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Reply to all the recipients using the --to and --cc options:
  reply via email

  To: pgsql-sql@postgresql.org
  Cc: tgl@sss.pgh.pa.us, adrian.klaver@aklaver.com, tdudgeon.ml@gmail.com
  Subject: Re: querying with index on jsonb slower than standard column. Why?
  In-Reply-To: <27877.1418057764@sss.pgh.pa.us>

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

This inbox is served by agora; see mirroring instructions
for how to clone and mirror all data and code used for this inbox