Re: increasing effective_cache_size slows down join queries by a factor of 4000x

2022-02-14 Thread A Shaposhnikov
xes. Obviously, the optimizer grossly miscalculates the costs, how can we help it? On Fri, Feb 4, 2022 at 9:01 AM Tomas Vondra wrote: > On 2/4/22 05:21, A Shaposhnikov wrote: > > Tomas, > > > > thank you! The query: > > > > select 1 from data as d, da

Re: increasing effective_cache_size slows down join queries by a factor of 4000x

2022-02-03 Thread A Shaposhnikov
imizer would be able to infer it itself. Thank you On Thu, Feb 3, 2022 at 4:24 PM Tomas Vondra wrote: > > > > On 2/3/22 20:32, A Shaposhnikov wrote: > > I made a mistake yesterday claiming that the created statistics > > changed the row counts in the estimates - it did no

Re: increasing effective_cache_size slows down join queries by a factor of 4000x

2022-02-03 Thread A Shaposhnikov
y low cost regardless of size. Another guess is that it almost ignores the "limit" parameter or uses it in some incorrect way. On Thu, Feb 3, 2022 at 12:31 PM Vijaykumar Jain wrote: > > > On Fri, 4 Feb 2022 at 01:03, A Shaposhnikov wrote: >> >> I made a mistake yeste

Re: increasing effective_cache_size slows down join queries by a factor of 4000x

2022-02-03 Thread A Shaposhnikov
I made a mistake yesterday claiming that the created statistics changed the row counts in the estimates - it did not - I looked at the wrong query yesterday. In the correct query plan the row estimate still differs from the actual by many orders of magnitude: Nested Loop (cost=1.01..27584834.53