Re: Partial index on JSON column

Поиск
Список
Период
Сортировка
Искать
От
Michael Lewis
Тема
Re: Partial index on JSON column
Дата
Msg-id
CAHOFxGqsy8XqRsFC8z_uFuSKbpuJUfgaXigFXELU6it6pweT5A@mail.gmail.com
Ответ на
Список
Дерево обсуждения
Partial index on JSON column Samuel Williams <space.ship.traveller@gmail.com>
Re: Partial index on JSON column Tom Lane <tgl@sss.pgh.pa.us>
Re: Partial index on JSON column Tom Lane <tgl@sss.pgh.pa.us>
Re: Partial index on JSON column Samuel Williams <space.ship.traveller@gmail.com>
Re: Partial index on JSON column Samuel Williams <space.ship.traveller@gmail.com>
Re: Partial index on JSON column Samuel Williams <space.ship.traveller@gmail.com>
Re: Partial index on JSON column Michael Lewis <mlewis@entrata.com>
Re: Partial index on JSON column Michael Lewis <mlewis@entrata.com>

On Tue, Feb 19, 2019 at 1:41 PM Samuel Williams <space.ship.traveller@gmail.com> wrote:
Hello

I have a table with ~3 billion events.

Of this, there are a small subset of events which match the following query:

CREATE INDEX index_user_event_for_suggestion_notification ON public.user_event USING btree ((((parameters ->> 'suggestion_id'::text))::integer), what) WHERE ((parameters ->> 'suggestion_id'::text) IS NOT NULL)

You may want to use this-
CREATE INDEX index_user_event_for_suggestion_notification ON public.user_event USING btree (parameters ->> 'suggestion_id', what) WHERE parameters ? 'suggestion_id';


-Michael 
В списке pgsql-general по дате отправления
От: Samuel Williams
Дата:
От: Michael Lewis
Дата:
FAQ