Received: from localhost (unknown [200.46.204.183]) by postgresql.org (Postfix) with ESMTP id 39D882E30A7 for ; Sun, 10 Feb 2008 02:11:04 -0400 (AST) Received: from postgresql.org ([200.46.204.71]) by localhost (mx1.hub.org [200.46.204.183]) (amavisd-maia, port 10024) with ESMTP id 55083-10 for ; Sun, 10 Feb 2008 02:11:02 -0400 (AST) Received: from sss.pgh.pa.us (sss.pgh.pa.us [66.207.139.130]) by postgresql.org (Postfix) with ESMTP id B80672E308C for ; Sun, 10 Feb 2008 02:11:01 -0400 (AST) Received: from sss2.sss.pgh.pa.us (tgl@localhost [127.0.0.1]) by sss.pgh.pa.us (8.14.2/8.14.2) with ESMTP id m1A6B0Ls008382; Sun, 10 Feb 2008 01:11:00 -0500 (EST) To: "Dean Gibson (DB Administrator)" cc: pgsql-admin@postgresql.org Subject: Re: When to ANALYZE w/ auto-vacuum In-reply-to: <47AE7EC8.9040403@ultimeth.com> References: <47AE7EC8.9040403@ultimeth.com> Comments: In-reply-to "Dean Gibson (DB Administrator)" message dated "Sat, 09 Feb 2008 20:34:16 -0800" Date: Sun, 10 Feb 2008 01:11:00 -0500 Message-ID: <8381.1202623860@sss.pgh.pa.us> From: Tom Lane X-Virus-Scanned: Maia Mailguard 1.0.1 X-Archive-Number: 200802/121 X-Sequence-Number: 28195 "Dean Gibson (DB Administrator)" writes: > 1. There is one nightly process I run where I create a fairly large TEMP > table (well over 1 million rows), and then I immediately use it in a > subsequent SELECT. Would a scripted ANALYZE be really needed here, or > does the auto-vacuum track the large TEMP table as I create it (via a > single SELECT). > 2. For that manner, do TEMP tables get higher priority in auto-vacuum > runs? That would seem to be a good idea. autovacuum cannot touch other sessions' temp tables at all --- it physically doesn't have access to them. (To give it such access would require destroying most of the performance advantages of making a table temp in the first place.) regards, tom lane