Ow Mun Heng <Ow.Mun.Heng@wdc.com> writes:
> Can anyone shed some light on this. I just would like to know if queries
> for raw data (not aggregregates) is expected to take a long time.
> Running times between 30 - 2 hours for large dataset pulls.
> Involves lots of joins on very large tables (min 1 millon rows each
> table, 300 columns per table)
> Joins are done in the form of Left joins (sometimes on the same tables,
> due to normalisation)
> Is 30min - 2hours too long or is this considered "normal"??
This question is nearly content-free. How many joins is "lots"? How
many result rows are you expecting? What PG version are you using?
What have you got work_mem set to? What does EXPLAIN say the plan is
(EXPLAIN ANALYZE output would be better, but you'll have to wait for the
results...)?
regards, tom lane