Received: from sss.pgh.pa.us ([192.204.191.242]) by postgresql.org (8.11.3/8.11.4) with ESMTP id fBI1MTm09027 for ; Mon, 17 Dec 2001 20:22:29 -0500 (EST) (envelope-from tgl@sss.pgh.pa.us) Received: from sss2.sss.pgh.pa.us (tgl@localhost [127.0.0.1]) by sss.pgh.pa.us (8.11.4/8.11.4) with ESMTP id fBI1LKi08925; Mon, 17 Dec 2001 20:21:21 -0500 (EST) To: "Josh Berkus" cc: Oleg Lebedev , Postgres SQL Mailing List Subject: Re: won't drop the view In-reply-to: References: Comments: In-reply-to "Josh Berkus" message dated "Mon, 17 Dec 2001 17:08:07 -0800" Date: Mon, 17 Dec 2001 20:21:20 -0500 Message-ID: <8922.1008638480@sss.pgh.pa.us> From: Tom Lane X-Archive-Number: 200112/188 X-Sequence-Number: 6011 "Josh Berkus" writes: > Damn. I can only really help with the obvious things, and you've > covered most of those. That view should take a long time, given the > complexity ... but a long time is 30-60 seconds, not 10 minutes. I'm guessing it's ye olde stupid-choice-of-plan kind of problem. Unless I missed it, we have not been shown the plan currently being used (no, the first four lines don't do it for me...) You could probably get back to the previous, not-so-slow plan choice by doing "DELETE FROM pg_statistic" to remove the data collected by VACUUM ANALYZE. A comparison of the EXPLAIN output in that state vs. the EXPLAIN output in the analyzed state might be enlightening. regards, tom lane