Re: [PERFORM] Performance problems with multiple layers of functions

2006-03-24 Thread Tom Lane
Svenne Krap <[EMAIL PROTECTED]> writes: > Tom Lane wrote: >> where (flow_direction, dataset_id) in (select * from new_func(122)) > Is this form of multi-column IN mentioned anywhere in the docs? I can't > find it. Sure, look under "Subquery Expressions". 8.0 and later refer to it as a row_const

Re: [PERFORM] Performance problems with multiple layers of functions

2006-03-24 Thread Svenne Krap
Tom Lane wrote: where (flow_direction, dataset_id) in (select * from new_func(122)) Is this form of multi-column IN mentioned anywhere in the docs? I can't find it. Svenne smime.p7s Description: S/MIME Cryptographic Signature

Re: [PERFORM] Performance problems with multiple layers of functions

2006-03-24 Thread Tom Lane
"Jim C. Nasby" <[EMAIL PROTECTED]> writes: > On Fri, Mar 24, 2006 at 01:49:17PM +0100, Svenne Krap wrote: >> explain select dataset_id, entity, sum(amount) from entrydata_current >> where flow_direction in (select * from outflow_direction(dataset_id)) >> and dataset_id in (select * from get_data

Re: [PERFORM] Performance problems with multiple layers of functions

2006-03-24 Thread Jim C. Nasby
On Fri, Mar 24, 2006 at 01:49:17PM +0100, Svenne Krap wrote: > explain select dataset_id, entity, sum(amount) from entrydata_current > where flow_direction in (select * from outflow_direction(dataset_id)) > and dataset_id in (select * from get_dataset_ids(122)) group by > dataset_id, entity;

[PERFORM] Performance problems with multiple layers of functions

2006-03-24 Thread Svenne Krap
Hi there. I have hit a edge in the planning and I hope you can help. The system uses a lot of stored procedures to move as much of the intelligence into the database layer as possible. My (development) query looks like and runs reasonably fast: explain analyze select dataset_id, entity, sum(