Re: DISTINCT on jsonb fields and Indexes

From: Michael Lewis <mlewis(at)entrata(dot)com>
To: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
Cc: Sankar P <sankar(dot)curiosity(at)gmail(dot)com>, PostgreSQL General <pgsql-general(at)lists(dot)postgresql(dot)org>
Subject: Re: DISTINCT on jsonb fields and Indexes
Date: 2020-06-22 20:10:19
Message-ID: CAHOFxGoMiX+Vc=E_t5yxaWZbe2+cbU-68bWJYge_AB+foVfDTw@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

>
> In the example of "select distinct expression", the planner will never
> notice
> that that expression has anything to do with an index.
>

Thanks for that explanation. I assume re-writing as a 'group by' would have
no bearing on that planner decision.

In response to

Responses

Browse pgsql-general by date

  From Date Subject
Next Message Pavan Kumar 2020-06-22 20:34:25 scram-sha-256 encrypted password in pgpass
Previous Message Jim Hurne 2020-06-22 20:00:59 RE: autovacuum failing on pg_largeobject and disk usage of the pg_largeobject growing unchecked