Re: index paths and enable_indexscan - Mailing list pgsql-hackers

From Amit Langote
Subject Re: index paths and enable_indexscan
Date
Msg-id CA+HiwqHwYCxFPGbMd8GcEYBXNL+naTTeftBX19WHh0dk04W75w@mail.gmail.com
Whole thread Raw
In response to Re: index paths and enable_indexscan  (Andy Fan <zhihui.fan1213@gmail.com>)
Responses Re: index paths and enable_indexscan  (Tom Lane <tgl@sss.pgh.pa.us>)
List pgsql-hackers
On Tue, Apr 14, 2020 at 6:12 PM Andy Fan <zhihui.fan1213@gmail.com> wrote:
> On Tue, Apr 14, 2020 at 4:58 PM Amit Langote <amitlangote09@gmail.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



pgsql-hackers by date:

Previous
From: Robert Haas
Date:
Subject: Re: where should I stick that backup?
Next
From: Tom Lane
Date:
Subject: Re: index paths and enable_indexscan