Why does the postgres planner create an all-vs-all join for some queries and not others?
I was writing a function to process selected entries of one table, by creating entries in two other tables. The second inserted table contains a reference to the first inserted table.
How do 2 query plans on the same table have large row estimation differences
Problem