Re: index paths and enable_indexscan

From: Richard Guo <guofenglinux(at)gmail(dot)com>
To: Amit Langote <amitlangote09(at)gmail(dot)com>
Cc: PostgreSQL-development <pgsql-hackers(at)postgresql(dot)org>
Subject: Re: index paths and enable_indexscan
Date: 2020-04-14 07:12:56
Message-ID: CAMbWs4-+zTPg8rQUMWwfSpC_heYVsUhHcc7Sf9fvCWKSynpWvA@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

On Tue, Apr 14, 2020 at 2:44 PM Amit Langote <amitlangote09(at)gmail(dot)com>
wrote:

> Hi,
>
> Maybe I am missing something obvious, but is it intentional that
> enable_indexscan is checked by cost_index(), that is, *after* creating
> an index path? I was expecting that if enable_indexscan is off, then
> no index paths would be generated to begin with, because I thought
> they are optional.
>

I think the cost estimate of index paths is the same as other paths on
that setting enable_xxx to off only adds a penalty factor (disable_cost)
to the path's cost. The path would be still generated and compete with
other paths in add_path().

Thanks
Richard

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Peter Eisentraut 2020-04-14 07:17:39 Re: pgsql: Improve handling of parameter differences in physical replicatio
Previous Message Michael Paquier 2020-04-14 06:53:36 Incremental sorts and EXEC_FLAG_REWIND