Hi Tom,
Thanks a lot for sharing.
The GUC constraint_exclusion setting is helpful, especially for handling
poorly written queries.
Thanks & Best Regards,
Ajit
On Wed, 25 Jun 2025 at 21:58, Tom Lane wrote:
> Ajit Awekar writes:
> > EXPLAIN (costs off)
> > select * from products where price <
Ajit Awekar writes:
> EXPLAIN (costs off)
> select * from products where price < 100 AND price > 300;
> Seq Scan on products
> Filter: ((price < '100'::numeric) AND (price > '300'::numeric))
> Since this condition is false and result will always be empty. Despite
> this, we still perform unnece
Hi Team,
Please find below an observation regarding query planning that leads to
unnecessary table scan when the WHERE clause contains non-overlapping
conditions.
EXPLAIN (costs off)
select * from products where price < 100 AND price > 300;
Seq Scan on products
Filter: ((price < '100'::numeri