Re: PostgreSQL opens all the indexes of a relation for every Query during Planning Time?

From: Meenatchi Sandanam <meen(dot)opm(at)gmail(dot)com>
To: Jason Petersen <jason(at)citusdata(dot)com>
Cc: pgsql-performance-owner(at)lists(dot)postgresql(dot)org, pgsql-hackers(at)lists(dot)postgresql(dot)org
Subject: Re: PostgreSQL opens all the indexes of a relation for every Query during Planning Time?
Date: 2018-03-20 08:04:02
Message-ID: CAJJu9dN=omj9r_eAWUNPP2zKMXSduVcjisbDoX=PuVuGCRfwpQ@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

Please refer this https://www.postgresql.org/message-id/CAJJu9dMg3662E-
wR25ZyAJwVdG7Cz56r-8Bw4ejfT9i42Oo2LA(at)mail(dot)gmail(dot)com

On Fri, Mar 16, 2018 at 10:48 PM, Jason Petersen <jason(at)citusdata(dot)com>
wrote:

> On Mar 15, 2018, at 4:18 AM, Meenatchi Sandanam <meen(dot)opm(at)gmail(dot)com>
> wrote:
>
> On checking PostgreSQL code, we see it opens all indexes of a relation for
> every query planning time as in the attachment. If that is the case, it
> might lead to Performance degradation for relations with many indexes. Is
> there any other better way to handle this like Scanning/Opening only the
> indexes related to columns specified in the query?
>
>
> I’d think you’d need a pretty clear profiling run that points to this as a
> hot spot before deciding to optimize it. Do you have a query where this is
> the case?
>
> --
> *Jason Petersen*
> Software Engineer | Citus Data
> 303.736.9255
> jason(at)citusdata(dot)com
>
>

In response to

Browse pgsql-hackers by date

  From Date Subject
Next Message Pavel Stehule 2018-03-20 08:06:02 possibly to automatic detection of bad variable types in plans?
Previous Message Amit Langote 2018-03-20 06:57:34 Re: [HACKERS] Add support for tuple routing to foreign partitions