Re: Partial index on JSON column

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: Samuel Williams <space(dot)ship(dot)traveller(at)gmail(dot)com>
Cc: pgsql-general <pgsql-general(at)postgresql(dot)org>
Subject: Re: Partial index on JSON column
Date: 2019-02-19 23:17:39
Message-ID: 27830.1550618259@sss.pgh.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

I wrote:
> Try it like

> EXPLAIN SELECT COUNT(*) FROM "user_event" WHERE ((parameters ->>
> 'suggestion_id'::text) = '26') AND what = 'suggestion_notification';

> I don't think we assume that CoerceViaIO is strict, and without that
> the deduction that the value couldn't be null doesn't hold.

Hmm ... on closer inspection, we do assume that CoerceViaIO is strict,
but not everyplace knows that, so there's something that could be
improved here. In the meantime, try it as stated above.

regards, tom lane

In response to

Responses

Browse pgsql-general by date

  From Date Subject
Next Message Samuel Williams 2019-02-20 00:39:18 Re: Partial index on JSON column
Previous Message Julie Nishimura 2019-02-19 23:02:47 adding more space to the existing 9.6 cluster