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

From: Michael Lewis <mlewis(at)entrata(dot)com>
To: A Shaposhnikov <artyom(at)gmail(dot)com>
Cc: Tomas Vondra <tomas(dot)vondra(at)enterprisedb(dot)com>, pgsql-general <pgsql-general(at)lists(dot)postgresql(dot)org>
Subject: Re: increasing effective_cache_size slows down join queries by a factor of 4000x
Date: 2022-02-15 05:44:11
Message-ID: CAHOFxGojXjwzZTkFBqQtxJOTJKkD8Qnu38PqGp2dm-nTN6mMZw@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

I think that theoretically if the planner sees a condition like

a.column1 > constant_value, and it also has a condition like a.column1 =
b.column2 then it could autogenerate the b.column2 > constant_value
condition. And of course > could be <, <=, >= and <>

But I could be wrong, particularly with respect to nulls and how = is
mostly the same as 'is not distinct from' except for 'select null = null'
being null and 'select null is not distinct from null' being true. Perhaps
if either/both columns have a not null constraint, then this could still be
done. Whether or not it should be a separate question.

In response to

Browse pgsql-general by date

  From Date Subject
Next Message Michael Lewis 2022-02-15 06:03:23 Re: Rows From but with Subqueries (or a cleaner non-array-using alternative)?
Previous Message A Shaposhnikov 2022-02-15 00:06:34 Re: increasing effective_cache_size slows down join queries by a factor of 4000x