Received: from maia.hub.org (maia-3.hub.org [200.46.204.243]) by mail.postgresql.org (Postfix) with ESMTP id 377961337B5A for ; Thu, 11 Nov 2010 14:23:11 -0400 (AST) Received: from mail.postgresql.org ([200.46.204.86]) by maia.hub.org (mx1.hub.org [200.46.204.243]) (amavisd-maia, port 10024) with ESMTP id 70203-02 for ; Thu, 11 Nov 2010 18:23:04 +0000 (UTC) X-Greylist: from auto-whitelisted by SQLgrey-1.7.6 Received: from sss.pgh.pa.us (sss.pgh.pa.us [66.207.139.130]) by mail.postgresql.org (Postfix) with ESMTP id CD88D1336971 for ; Thu, 11 Nov 2010 14:23:03 -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 oABIN3bv018451; Thu, 11 Nov 2010 13:23:03 -0500 (EST) To: Robert Haas cc: Kevin Grittner , Mladen Gogala , "pgsql-performance@postgresql.org" Subject: Re: anti-join chosen even when slower than old plan In-reply-to: References: <4CD9663502000025000374B1@gw.wicourts.gov> <20961.1289347680@sss.pgh.pa.us> <4CDA62C60200002500037512@gw.wicourts.gov> <4CDACBBF020000250003755B@gw.wicourts.gov> <4CDB7BAA.7020506@vmsinfo.com> <4CDBB0A40200002500037571@gw.wicourts.gov> Comments: In-reply-to Robert Haas message dated "Thu, 11 Nov 2010 12:57:54 -0500" Date: Thu, 11 Nov 2010 13:23:03 -0500 Message-ID: <18450.1289499783@sss.pgh.pa.us> From: Tom Lane X-Virus-Scanned: Maia Mailguard 1.0.1 X-Spam-Status: No, hits=-1.91 tagged_above=-10 required=5 tests=BAYES_00=-1.9, T_RP_MATCHES_RCVD=-0.01 X-Spam-Level: X-Archive-Number: 201011/157 X-Sequence-Number: 41181 Robert Haas writes: > Let's back up a moment and talk about what the overall goal is, here. > Ideally, we would like PostgreSQL to have excellent performance at all > times, under all circumstances, with minimal tuning. Therefore, we do > NOT want to add variables that will, by design, need constant manual > adjustment. That is why I suggested that Tom's idea of an > assume_cached GUC is probably not what we really want to do. On the > other hand, what I understand Mladen to be suggesting is something > completely different. He's basically saying that, of course, he wants > it to work out of the box most of the time, but since there are > guaranteed to be cases where it doesn't, how about providing some > knobs that aren't intended to be routinely twaddled but which are > available in case of emergency? Bravo, I say! Um ... those are exactly the same thing. You're just making different assumptions about how often you will need to twiddle the setting. Neither assumption is based on any visible evidence, unfortunately. I was thinking of assume_cached as something that could be set-and-forget most of the time, and you're entirely right to criticize it on the grounds that maybe it wouldn't. But to support a proposal that doesn't even exist yet on the grounds that it *would* be set-and-forget seems a tad inconsistent. We can't make that judgment without a whole lot more details than have been provided yet for any idea in this thread. I do think that something based around a settable-per-table caching percentage might be a reasonable way to proceed. But the devil is in the details, and we don't have those yet. regards, tom lane