Re: EXPLAIN IndexOnlyScan shows disabled when enable_indexonlyscan=on

2024-10-28 Thread David Rowley
On Tue, 29 Oct 2024 at 14:41, David G. Johnston wrote: > > On Mon, Oct 28, 2024 at 3:54 PM David Rowley wrote: > -Enables or disables the query planner's use of index-scan plan > -types. The default is on. > +Enables or disables the query planner's use of index-scan and >

Re: EXPLAIN IndexOnlyScan shows disabled when enable_indexonlyscan=on

2024-10-28 Thread David G. Johnston
On Mon, Oct 28, 2024 at 3:54 PM David Rowley wrote: > > I've attached that in patch form. > > -Enables or disables the query planner's use of index-scan plan -types. The default is on. +Enables or disables the query planner's use of index-scan and +index-only-scan

Re: EXPLAIN IndexOnlyScan shows disabled when enable_indexonlyscan=on

2024-10-28 Thread David G. Johnston
On Mon, Oct 28, 2024 at 6:03 PM David Rowley wrote: > We don't seem to be agreeing on much here... :-( > > On Tue, 29 Oct 2024 at 13:30, David G. Johnston > wrote: > > > > On Mon, Oct 28, 2024 at 3:54 PM David Rowley > wrote: > >> I'm concerned about the wording "all index-scan related". It's

Re: EXPLAIN IndexOnlyScan shows disabled when enable_indexonlyscan=on

2024-10-28 Thread David G. Johnston
On Mon, Oct 28, 2024 at 3:54 PM David Rowley wrote: > On Wed, 23 Oct 2024 at 13:51, David G. Johnston > wrote: > > Went with a slightly different wording that seems to flow better with > the xrefs I added between the two options. > > -Enables or disables the query planner's use of index-

Re: EXPLAIN IndexOnlyScan shows disabled when enable_indexonlyscan=on

2024-10-28 Thread David Rowley
We don't seem to be agreeing on much here... :-( On Tue, 29 Oct 2024 at 13:30, David G. Johnston wrote: > > On Mon, Oct 28, 2024 at 3:54 PM David Rowley wrote: >> I'm concerned about the wording "all index-scan related". It's not >> that clear if that would include Bitmap Index Scans or not. >

Re: EXPLAIN IndexOnlyScan shows disabled when enable_indexonlyscan=on

2024-10-28 Thread David Rowley
On Wed, 23 Oct 2024 at 13:51, David G. Johnston wrote: > Went with a slightly different wording that seems to flow better with the > xrefs I added between the two options. -Enables or disables the query planner's use of index-scan plan -types. The default is on. +Enables

Re: EXPLAIN IndexOnlyScan shows disabled when enable_indexonlyscan=on

2024-10-22 Thread David G. Johnston
On Mon, Oct 21, 2024 at 7:20 PM David Rowley wrote: > On Tue, 22 Oct 2024 at 14:46, David G. Johnston > wrote: > > We should probably at least improve the documentation in 19.17.1; this > interaction is apparently not self-evident. > > Yeah, I agree. The documentation could better reflect the cu

Re: EXPLAIN IndexOnlyScan shows disabled when enable_indexonlyscan=on

2024-10-22 Thread Melanie Plageman
On Tue, Oct 22, 2024 at 3:21 PM David Rowley wrote: > > On Wed, 23 Oct 2024 at 02:08, Melanie Plageman > wrote: > > However, it seems like there should be a way to force an index-only > > scan even if it is not the cheapest path. Perhaps I only think this as > > a developer needing to test someth

Re: EXPLAIN IndexOnlyScan shows disabled when enable_indexonlyscan=on

2024-10-22 Thread David Rowley
On Wed, 23 Oct 2024 at 02:08, Melanie Plageman wrote: > However, it seems like there should be a way to force an index-only > scan even if it is not the cheapest path. Perhaps I only think this as > a developer needing to test something. But if enable_indexscan > disables index-only scan then I do

Re: EXPLAIN IndexOnlyScan shows disabled when enable_indexonlyscan=on

2024-10-22 Thread Melanie Plageman
On Mon, Oct 21, 2024 at 9:32 PM David Rowley wrote: > > There's nothing new about Index Only Scans being disabled by > enable_indexscan. Index Only Scan is chosen with your test case as all > possible Paths are disabled and IOS is the cheapest of all Paths. Ah, I see! Sorry, I didn't think to com

Re: EXPLAIN IndexOnlyScan shows disabled when enable_indexonlyscan=on

2024-10-21 Thread David G. Johnston
On Monday, October 21, 2024, David Rowley wrote: > On Tue, 22 Oct 2024 at 14:46, David G. Johnston > wrote: > > We should probably at least improve the documentation in 19.17.1; this > interaction is apparently not self-evident. > > > > enable_indexscan > > > > Enable or disable the planner’s us

Re: EXPLAIN IndexOnlyScan shows disabled when enable_indexonlyscan=on

2024-10-21 Thread David Rowley
On Tue, 22 Oct 2024 at 14:46, David G. Johnston wrote: > We should probably at least improve the documentation in 19.17.1; this > interaction is apparently not self-evident. > > enable_indexscan > > Enable or disable the planner’s use of both index-scan and index-only-scans > plan types. > > ena

Re: EXPLAIN IndexOnlyScan shows disabled when enable_indexonlyscan=on

2024-10-21 Thread David Rowley
On Tue, 22 Oct 2024 at 13:45, Melanie Plageman wrote: > I was surprised today when I saw that with > enable_indexscan=off > enable_indexonlyscan=on > EXPLAIN prints that the index only scan is disabled: > > QUERY PLAN > --- > Index Onl