From: | Merlin Moncure <mmoncure(at)gmail(dot)com> |
---|---|
To: | Josh Berkus <josh(at)agliodbs(dot)com> |
Cc: | postgres performance list <pgsql-performance(at)postgresql(dot)org> |
Subject: | Re: working around JSONB's lack of stats? |
Date: | 2015-02-02 15:42:48 |
Message-ID: | CAHyXU0xpr5C+x1RmRzo9ppGZnVYq_8d2htojHisE-KHSj2YdOA@mail.gmail.com |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-performance |
On Tue, Jan 27, 2015 at 1:06 AM, Josh Berkus <josh(at)agliodbs(dot)com> wrote:
> Folks,
>
> Currently, JSONB fields don't have statistics, and estimate a flat 1%
> selectivity. This can result in poor query plans, and I'm wondering if
> anyone has a suggested workaround for this short of hacking a new
> selectivity function. For example, take the common case of using JSONB
> to hold a list of "tags" for tagging documents:
hm, Why stop at jsonb? What's needed is a way to override the
planner's row estimate in a general way.
merlin
From | Date | Subject | |
---|---|---|---|
Next Message | Jim Nasby | 2015-02-03 01:36:15 | Re: why pg_class.relfrozenxid needs to be updated for frozen tables (where all rows have xmin=2)? |
Previous Message | Marc Mamin | 2015-02-02 10:31:10 | Re: Why is GIN index slowing down my query? |