Re: Use index to estimate expression selectivity

2023-11-23 Thread Tomas Vondra
On 11/23/23 18:30, Tom Lane wrote: > Bono Stebler writes: >> After discussing the issue on irc, it looks like it could be possible >> for the planner to use a partial index matching an expression exactly to >> estimate its selectivity. > > I think going forward we're going to be more interes

Re: Use index to estimate expression selectivity

2023-11-23 Thread Tom Lane
Bono Stebler writes: > After discussing the issue on irc, it looks like it could be possible > for the planner to use a partial index matching an expression exactly to > estimate its selectivity. I think going forward we're going to be more interested in extending CREATE STATISTICS than in addi

Use index to estimate expression selectivity

2023-11-23 Thread Bono Stebler
Dear hackers, After discussing the issue on irc, it looks like it could be possible for the planner to use a partial index matching an expression exactly to estimate its selectivity. Here is a simplified version (thanks ysch) of the issue I am facing: https://dbfiddle.uk/flPq8-pj I have tri