X-Original-To: pgsql-performance-postgresql.org@localhost.postgresql.org Received: from localhost (unknown [200.46.204.2]) by svr1.postgresql.org (Postfix) with ESMTP id 167DED1B538 for ; Wed, 29 Oct 2003 14:02:34 +0000 (GMT) Received: from svr1.postgresql.org ([200.46.204.71]) by localhost (neptune.hub.org [200.46.204.2]) (amavisd-new, port 10024) with ESMTP id 27051-08 for ; Wed, 29 Oct 2003 10:02:05 -0400 (AST) Received: from dhcp-7-248.ma.lycos.com (waltham-nat.ma.lycos.com [209.202.205.1]) by svr1.postgresql.org (Postfix) with SMTP id 48476D1B4E5 for ; Wed, 29 Oct 2003 10:02:01 -0400 (AST) Received: (qmail 9959 invoked from network); 29 Oct 2003 14:04:02 -0000 Received: from dhcp-7-41.ma.lycos.com (HELO squeegit) (10.124.7.41) by dhcp-7-248.ma.lycos.com with SMTP; 29 Oct 2003 14:04:02 -0000 Date: Wed, 29 Oct 2003 09:01:54 -0500 From: Jeff To: Christopher Kings-Lynne Cc: sszabo@megazone.bigpanda.com, pgsql-performance@postgresql.org Subject: Re: Adding foreign key performance Message-Id: <20031029090154.53b1e22d.threshar@torgo.978.org> In-Reply-To: <3F9F1C30.4010306@familyhealth.com.au> References: <20031028091645.3d610841.threshar@torgo.978.org> <20031028113359.3932438f.threshar@torgo.978.org> <20031028101820.T64490@megazone.bigpanda.com> <3F9F1C30.4010306@familyhealth.com.au> X-Mailer: Sylpheed version 0.9.7 (GTK+ 1.2.10; i686-pc-linux-gnu) Mime-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit X-Virus-Scanned: by amavisd-new at postgresql.org X-Archive-Number: 200310/721 X-Sequence-Number: 4469 On Wed, 29 Oct 2003 09:47:28 +0800 Christopher Kings-Lynne wrote: > >>Just loaded up delicious 7.4b5 and wow... > >> > >>sort_mem 8192: 137038ms [lots of tmp file activity] > >>sort_mem 256000: 83109ms > > > 1. A full ANALYZE > 2. A delete all from pg_statistic > I had previously analyze'd before I ran those numbers. But I did it again with and without stats. With: Run 1 Time: 80157.21 ms Run 2 Time: 80763.59 ms Killed statistics: Time: 80571.71 ms Time: 80759.18 ms Chances are it is going to seq scan regardless so the stats are rather useless. Perhaps in other scenarios it would help. -- Jeff Trout http://www.jefftrout.com/ http://www.stuarthamm.net/