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 2E9FDD1B4F4 for ; Tue, 28 Oct 2003 14:05:48 +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 94296-02 for ; Tue, 28 Oct 2003 10:05:20 -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 B7C95D1B529 for ; Tue, 28 Oct 2003 10:05:15 -0400 (AST) Received: (qmail 26026 invoked from network); 28 Oct 2003 14:07:07 -0000 Received: from dhcp-7-41.ma.lycos.com (HELO squeegit) (10.124.7.41) by dhcp-7-248.ma.lycos.com with SMTP; 28 Oct 2003 14:07:07 -0000 Date: Tue, 28 Oct 2003 09:05:15 -0500 From: Jeff To: pgsql-performance@postgresql.org Subject: More info in explain analyze Message-Id: <20031028090515.278c8342.threshar@torgo.978.org> 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/699 X-Sequence-Number: 4447 This has probably been asked before, but I'll re-ask to spark debate on it again. Is there any good reason to not have explain analyze also include information if temporary files will be required on sorts, hashes, etc. during the processing of a query. [Idea being setting your sort_mem won't be purely anecdotal]... maybe include how much space it needed in temp files? something along the lines of: Sort (Cost=1..10) (Actual=1..1000) (Temp Files=5MB) Seeing that and looking at your current sort_mem and seeing it is 4MB you'll have the info you need to get a nice boost by avoiding that spill at a low cost. -- Jeff Trout http://www.jefftrout.com/ http://www.stuarthamm.net/