On Tue, Jan 27, 2015 at 1:06 AM, Josh Berkus <josh@agliodbs.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