From: | Mark Roghelia <mroghelia(at)topsailtech(dot)com> |
---|---|
To: | pgsql-performance(at)postgresql(dot)org |
Subject: | View performance degraded between 8.1 and 8.3 |
Date: | 2009-02-10 22:20:36 |
Message-ID: | EMEWEMEW2_DELIMl19GKc89898453881991060337b2,mroghelia@topsailtech.com,ABA4D918-D3A2-4DFE-8B35-DB |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-performance |
I've got an application that pulls stock information from the web and
performs a bunch of calculations on them. There is a "stock" table
and then for convenience I've got a view called "stock_calculations".
This view is defined as a stock id column coupled with 30-some
calculated columns. Some of these columns are computationally intense
and are delegated to functions.
If I ever "select * from stock_calculations", the query is
understandable pretty slow, since it has to do every one of the
calculations for each stock. However, in 8.1, if I only selected a
couple of specific columns from the view, it ran very quickly. I
assumed that the database did not bother calculating all the other
columns it didn't need.
Unfortunately, I've recently upgraded to 8.3 and found that selecting
a single column from this view has now become as slow as selecting all
of them.
I'm wondering if there is any thing that I can do about this short of
downgrading to 8.1? Are there any configuration parameters that
effect this behavior?
Thanks,
Mark
From | Date | Subject | |
---|---|---|---|
Next Message | Tom Lane | 2009-02-11 00:37:16 | Re: View performance degraded between 8.1 and 8.3 |
Previous Message | justin | 2009-02-10 21:01:12 | Re: explanation of some configs |