The same change also worked for clin.v_emr_journal. I changed all the select ... from dem.v_staff to "select .. from dem.staff v_staff" , and the journal literally just flashes on the screen ;)
On Mon, 2006-12-11 at 16:15 +0100, Karsten Hilbert wrote: > On Mon, Dec 11, 2006 at 08:40:32AM +1100, syan tan wrote: > > > now that 8.2 works with child tables (after vacuum analyse , i think ), > :-) > > > the performance bug with clin.v_pat_narrative was traced to > > dem.v_staff; actually, there isn't a need to use dem.v_staff in > > the query; use dem.staff instead, > Done. > > > and the performance is less > > than a second (vs 10 minutes). > Here is another tidbit which might decrease performance: > > gnumed_v3=> explain SELECT * from clin.clin_narrative where modified_by = > 'gm-dbo'; > QUERY PLAN > ----------------------------------------------------------------- > Seq Scan on clin_narrative (cost=0.00..22.50 rows=6 width=168) > Filter: (modified_by = 'gm-dbo'::name) > > IOW, clin.v_pat_narrative does > > where clin.clin_narrative.modified_by = dem.staff.db_user > > which lacks an index. I'll add one... > > Karsten _______________________________________________ Gnumed-devel mailing list [email protected] http://lists.gnu.org/mailman/listinfo/gnumed-devel
