Estimating bloat for very large tables: what is the state of art?

2022-09-13 Thread Dmitry Astapov
Hi! I am trying to solve the problem of estimating the table bloat (and index bloat, though I am mostly focusing on tables at the moment). After searching far and wide, it seems that the choice is to be made between two methods: 1. Slow, but very precise pgstattuple 2. Fast, but somewhat

Re: Condition pushdown: why (=) is pushed down into join, but BETWEEN or >= is not?

2021-05-13 Thread Dmitry Astapov
On Wed, May 12, 2021 at 4:54 PM Tom Lane wrote: > Dmitry Astapov writes: > > I am trying to understand the behaviour of the query planner regarding > the > > push-down of the conditions "through" the join. > > I think your mental model is wron

Condition pushdown: why (=) is pushed down into join, but BETWEEN or >= is not?

2021-05-12 Thread Dmitry Astapov
Hi! I am trying to understand the behaviour of the query planner regarding the push-down of the conditions "through" the join. Lets say that I have tables a(adate date, aval text) and b(bdate date, bval text), and I create a view: create view v as select a.adate, a.aval, b.bval from a join b