Re: [PERFORM] Effects of cascading references in foreign keys

2005-10-30 Thread Martin Lesser
Bruce Momjian writes: > Thomas F. O'Connell wrote: >> It seems like this warrants an item somewhere in the release notes, >> and I'm not currently seeing it (or a related item) anywhere. Perhaps >> E.1.3.1 (Performance Improvements)? For some of the more extreme >> UPDATE scenarios I've see

Re: [PERFORM] multi-layered view join performance oddities

2005-10-30 Thread Svenne Krap
Tom Lane wrote: Svenne Krap <[EMAIL PROTECTED]> writes: create view ord_institutes_sum as SELECT ord_property_type_all.dataset_id, ord_property_type_all.nb_property_type_id, 0 AS institut, sum(ord_property_type_all.amount) AS amount FROM ord_property_type_all GROUP BY ord_prop

Re: [PERFORM] multi-layered view join performance oddities

2005-10-30 Thread Svenne Krap
Hi. Your suggestion with disableing the nested loop really worked well: rkr=# set enable_nestloop=false; SET rkr=# explain analyze select * from ord_result_pct_pretty ;     QUERY PLAN

Re: [PERFORM] multi-layered view join performance oddities

2005-10-30 Thread Tom Lane
Svenne Krap <[EMAIL PROTECTED]> writes: > create view ord_institutes_sum as > SELECT ord_property_type_all.dataset_id, > ord_property_type_all.nb_property_type_id, 0 AS institut, > sum(ord_property_type_all.amount) AS amount >FROM ord_property_type_all > GROUP BY ord_property_type_all.datas

Re: [PERFORM] multi-layered view join performance oddities

2005-10-30 Thread Steinar H. Gunderson
On Sun, Oct 30, 2005 at 06:16:04PM +0100, Svenne Krap wrote: > Nested Loop (cost=223.09..338.61 rows=1 width=174) (actual > time=20.213..721.361 rows=2250 loops=1) >Join Filter: (("outer".dataset_id = "inner".dataset_id) AND > ("outer".nb_property_type_id = "inner".nb_property_type_id)) >

[PERFORM] multi-layered view join performance oddities

2005-10-30 Thread Svenne Krap
Hi there. I have tried to implement the layered views as suggested earlier on one of the simplest queries (just to get a feel for it). And there seems to be something odd going on. Attached are all the statemens needed to see, how the database is made and the contents of postgresql.conf and

Re: [PERFORM] Effects of cascading references in foreign keys

2005-10-30 Thread Bruce Momjian
Thomas F. O'Connell wrote: > > In 8.1 there is a check to see if the foreign key value has changed > > and if > > not a trigger isn't queued. In the currently released versions any > > update > > will fire triggers. > > The check in comment for trigger.c didn't say if this optimization > > ap