Re: AW: Wrong rows estimations with joins of CTEs slows queries by more than factor 500

2023-02-09 Thread Tomas Vondra
> > FWIW I suggest you provide the data in a form that's easier to use (like > a working SQL script). More people are likely to look and help than when > they have to extract stuff from an e-mail, fill in missing pieces etc. > BTW if anyone wants to play with this, here are the SQL scripts I use

Re: AW: Wrong rows estimations with joins of CTEs slows queries by more than factor 500

2023-02-09 Thread Tomas Vondra
On 2/9/23 10:03, Hans Buschmann wrote: > Hello Tomas, > > > Thank you for looking at. > > > First, I miscalculated the factor which should be about 50, not 500. Sorry. > > Then I want to show you the table definitions (simple, very similar, > ommited child_tables and additional indexes, her