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