View performance degraded between 8.1 and 8.3

Поиск
Список
Период
Сортировка
Искать

View performance degraded between 8.1 and 8.3

От:
Mark Roghelia <mroghelia@topsailtech.com>
Дата:

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

Re: View performance degraded between 8.1 and 8.3

От:
Tom Lane <tgl@sss.pgh.pa.us>
Дата:
Mark Roghelia  writes:
> 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.

Without specifics there's really no way to answer this.

			regards, tom lane
FAQ