Re: [PERFORM] Slow hash join performance with many batches

2015-06-01 Thread Tom Lane
Alex Adriaanse writes: > I have several databases that have the same schema but different amounts of > data in it (let's categorize these as Small, Medium, and Large). We have a > mammoth query with 13 CTEs that are LEFT JOINed against a main table. This > query takes <30 mins on the Small data

[PERFORM] Slow hash join performance with many batches

2015-06-01 Thread Alex Adriaanse
I have several databases that have the same schema but different amounts of data in it (let's categorize these as Small, Medium, and Large). We have a mammoth query with 13 CTEs that are LEFT JOINed against a main table. This query takes <30 mins on the Small database, <2 hours to run on Large,