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
--
GPG key ID E4071346 @ wwwkeys.pgp.net
E167 67FD A291 2BEA 73BD 4537 78B9 A9F9 E407 1346
_______________________________________________
Gnumed-devel mailing list
[email protected]
http://lists.gnu.org/mailman/listinfo/gnumed-devel