Re: index paths and enable_indexscan

From: Amit Langote <amitlangote09(at)gmail(dot)com>
To: Andy Fan <zhihui(dot)fan1213(at)gmail(dot)com>
Cc: Richard Guo <guofenglinux(at)gmail(dot)com>, PostgreSQL-development <pgsql-hackers(at)postgresql(dot)org>
Subject: Re: index paths and enable_indexscan
Date: 2020-04-14 14:16:27
Message-ID: CA+HiwqHwYCxFPGbMd8GcEYBXNL+naTTeftBX19WHh0dk04W75w@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

On Tue, Apr 14, 2020 at 6:12 PM Andy Fan <zhihui(dot)fan1213(at)gmail(dot)com> wrote:
> On Tue, Apr 14, 2020 at 4:58 PM Amit Langote <amitlangote09(at)gmail(dot)com> wrote:
>> I am saying that instead of building index path with disabled cost,
>> just don't build it at all. A base rel will always have a sequetial
>> path, even though with disabled cost if enable_seqscan = off.
>
> Let's say user set enable_seqscan=off and set enable_indexscan=off;
> will you expect user to get seqscan at last? If so, why is seqscan
> (rather than index scan) since both are disabled by user equally?

I was really thinking of this in terms of planner effort, which for
creating an index path is more than creating sequential path, although
sure the payoff can be great. That is, I want the planner to avoid
creating index paths *to save cycles*, but see no way of making that
happen. I was thinking disabling enable_indexscan would do the trick.

--

Amit Langote
EnterpriseDB: http://www.enterprisedb.com

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Tom Lane 2020-04-14 14:20:50 Re: index paths and enable_indexscan
Previous Message Robert Haas 2020-04-14 14:16:15 Re: where should I stick that backup?