All,
Update I was able to resolve the problem by changing - partitioned tables to
single table and changing data type of 2 columns used in the joins from
varchar to varchar(50).
FYI.. default_statistics_target was set to 10000 but I changed it 100 and
even to 1000 and still planning time was high.
Still working on the dataset so that more people can investigate the issues.
--
Sent from: https://www.postgresql-archive.org/PostgreSQL-bugs-f2117394.html