"Linux Guru" <linux(dot)binary(at)gmail(dot)com> writes:
> We have a large datawarehouse stored in postgres and temp tables are created
> based on user query. The process of temp table creation involves selecting
> data from main fact table, this includes several select and update
> statements and one of the following update statement is having performance
> issues.
Try ANALYZEing the temp table before the step that's too slow.
If that doesn't help, let's see EXPLAIN ANALYZE (not just EXPLAIN)
output.
regards, tom lane