Excessive Planning Time for PostgreSQL Query Involving Union of 5000 Tables
I am working with a PostgreSQL database where I have a query that unions 5000 tables with identical structures. The query is saved as a view. I've noticed that the planning time for this query is significantly longer than the…