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: pgsql-performance-owner(at)lists(dot)postgresql(dot)org, pgsql-hackers(at)lists(dot)postgresql(dot)org
Subject: PostgreSQL opens all the indexes of a relation for every Query during Planning Time?
Date: 2018-03-15 10:18:35
Message-ID: CAJJu9dOQL5JKjv_XokA5r1fAw9Phsi67LFpcVpnF4vNj1Svong@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

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?

Attachment Content-Type Size
Screen Shot 2018-03-15 at 3.06.14 PM.png image/png 909.1 KB

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Arthur Zakirov 2018-03-15 10:33:51 Re: pg_get_functiondef forgets about most GUC_LIST_INPUT GUCs
Previous Message Ashutosh Bapat 2018-03-15 10:08:51 Re: [HACKERS] Partition-wise aggregation/grouping