Re: GIN index not used if created in the same transaction as query

From: Adam Brusselback <adambrusselback(at)gmail(dot)com>
To: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
Cc: pgsql-performance(at)postgresql(dot)org
Subject: Re: GIN index not used if created in the same transaction as query
Date: 2017-05-19 15:49:32
Message-ID: CAMjNa7e-Q9DwX4TZqtuQNkitf0b0W65NsW54u7HLnMU+m2pbkw@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-performance

>
> Does the "multiple steps" part involve UPDATEs on pre-existing rows?
> Do the updates change the column(s) used in the gin index?
>

Yes they do, however the updates happen prior to the index creation.

I just tried, and that looks like the solution. I really appreciate your
help on this.

Is there any easy way I can know if an index is usable or not? Are there
any catalog views or anything I could check that in?

Thanks,
-Adam

In response to

Responses

Browse pgsql-performance by date

  From Date Subject
Next Message Tom Lane 2017-05-19 16:09:58 Re: GIN index not used if created in the same transaction as query
Previous Message Tom Lane 2017-05-19 15:33:21 Re: GIN index not used if created in the same transaction as query