Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtp (Exim 4.80) (envelope-from ) id 1VgOGe-0001vT-07 for pgsql-performance@arkaria.postgresql.org; Wed, 13 Nov 2013 00:25:12 +0000 Received: from localhost ([127.0.0.1] helo=postgresql.org) by malur.postgresql.org with smtp (Exim 4.80) (envelope-from ) id 1VgOGd-0003Xw-BV for pgsql-performance@arkaria.postgresql.org; Wed, 13 Nov 2013 00:25:11 +0000 Received: from magus.postgresql.org ([2a02:c0:301:0:ffff::29]) by malur.postgresql.org with esmtp (Exim 4.80) (envelope-from ) id 1VfBS0-0005Uh-3a for pgsql-performance@postgresql.org; Sat, 09 Nov 2013 16:31:56 +0000 Received: from nm49-vm4.bullet.mail.bf1.yahoo.com ([216.109.115.191]) by magus.postgresql.org with esmtp (Exim 4.80) (envelope-from ) id 1VfBRs-0004nv-Cd for pgsql-performance@postgresql.org; Sat, 09 Nov 2013 16:31:55 +0000 Received: from [66.196.81.172] by nm49.bullet.mail.bf1.yahoo.com with NNFMP; 09 Nov 2013 16:31:46 -0000 Received: from [98.139.212.214] by tm18.bullet.mail.bf1.yahoo.com with NNFMP; 09 Nov 2013 16:30:46 -0000 Received: from [127.0.0.1] by omp1023.mail.bf1.yahoo.com with NNFMP; 09 Nov 2013 16:30:46 -0000 X-Yahoo-Newman-Property: ymail-3 X-Yahoo-Newman-Id: 93781.38817.bm@omp1023.mail.bf1.yahoo.com Received: (qmail 83676 invoked by uid 60001); 9 Nov 2013 16:30:45 -0000 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=ymail.com; s=s1024; t=1384014645; bh=y//TatCBxezBmdqVxakbpVqxvdjVR7RxFsF7J+O6jv8=; h=X-YMail-OSG:Received:X-Rocket-MIMEInfo:X-Mailer:References:Message-ID:Date:From:Reply-To:Subject:To:Cc:In-Reply-To:MIME-Version:Content-Type:Content-Transfer-Encoding; b=1SWHfb2TYf+7FG9P+hFJzjwknI5bnWd4yumoRujkq1+uX4filgLe5xEmXMWsg/rQKfCfv8ObholSJzYgJKvuvpz2S01dGt7ELZMZS1ObqA7ZBw4HwebeC2QBoyBcNmiy/zCewSDUwXc5Ol8zL5ChqKiYXd7DXtCDVi6enl/OTTE= DomainKey-Signature: a=rsa-sha1; q=dns; c=nofws; s=s1024; d=ymail.com; h=X-YMail-OSG:Received:X-Rocket-MIMEInfo:X-Mailer:References:Message-ID:Date:From:Reply-To:Subject:To:Cc:In-Reply-To:MIME-Version:Content-Type:Content-Transfer-Encoding; b=UUEBhjqnO6dcJNvjP0sVv1bmbpa5WEpbaJBGFKRS1A7nza5Gjw9sLRyg3bMhW0QEOurGvVitJeoN1RFgid+BvmSq2gz6ghFKACX0sM62NJ2TJiS52Ye6z423NXPhwPSHNnY2s5dS7IyNLFQ1bSkjnSDvTHpjtA9MhOUuRpgD8oc=; X-YMail-OSG: FbpwozgVM1m3F4jPj9yJQDD8dS_wZdx_IsFYTsEtQBWL.TK x0PbU.9A_JmU66iyL5r1Atq8Y0Awg7o2wiNURbYhnD.BhQIpKb5xCyI1QqYS L7VaLxBHjok_bEPeegtNvRmlL0DqddpIkI_IoR0s9t8HVCTXx.N6.jvYOsP1 tn7wMPKDUlTqKBqSuQg9nZTMUyeXcviZB3Vfnb9Pe5Bgc8AU_c0tM8yh7y3t Q2l6cTEvspFG8.lbZmCHD2ppuU9nwph.h1d9zAPkDrZ6XWMziCy3_I1FcEYD a1FxaF7YM.W0aFSukOZFpv4VgOvXGNHTma4v4hpIAhKAFitxfRSpnvoGGJ3L 0qRtYRBLsnnLScRsDpnORhjPVeW4FbN9yWcopBIepyB6FRsrDYw5Fk.DukAX N9Hj7dSvwDA9.uj3GPlqg2p6_0IhN4Ivf3JtD7PQbcRt5B6iV7Byxfi_w2db 2kUWcE7UAd1Gcrsy2hRKN_Zh6Uq2blruLecRIZJCLc6wOyEpiBtZVOolZDhn 76ss5pl557K_2qWEJsfKK41wIuHuQ.KV_jutXaaoRYlx_80gAeeQ3qhKkF9p x8AX9nACO8FGIbrmWjPNL6xPadNeGDN_UL.TnttHr Received: from [76.255.18.237] by web162903.mail.bf1.yahoo.com via HTTP; Sat, 09 Nov 2013 08:30:45 PST X-Rocket-MIMEInfo: 002.001, VG9tIExhbmUgPHRnbEBzc3MucGdoLnBhLnVzPiB3cm90ZToKCj4gSSB3b25kZXIgaWYgd2UgY291bGQgYW1lbGlvcmF0ZSB0aGlzIHByb2JsZW0gYnkgbWFraW5nCj4gZ2V0X2FjdHVhbF92YXJpYWJsZV9yYW5nZSgpIHVzZSBTbmFwc2hvdERpcnR5Cgo.IEluIHRoYXQgdGhyZWFkIEkgY2xhaW1lZCB0aGF0IGEgY3VycmVudCBNVkNDIHNuYXBzaG90IHdhcyB0aGUKPiBtb3N0IGFwcHJvcHJpYXRlIHRoaW5nLCB3aGljaCBpdCBwcm9iYWJseSBpczsKCklmIGl0IHJlYWRzIGZyb20gdGhlIGVuZCBvZiB0aGUgaW4BMAEBAQE- X-Mailer: YahooMailWebService/0.8.163.597 References: <51A79512.4020200@agliodbs.com> <51FAA1B8.6040809@agliodbs.com> <522E69F1.8070203@dunslane.net> <20130910122036.GF1024477@alap2.anarazel.de> <522F146D.2070908@dunslane.net> <5230B801.90507@agliodbs.com> <20130911211253.GF1138556@alap2.anarazel.de> <523120E9.6020300@agliodbs.com> <24236.1383940000@sss.pgh.pa.us> Message-ID: <1384014645.82057.YahooMailNeo@web162903.mail.bf1.yahoo.com> Date: Sat, 9 Nov 2013 08:30:45 -0800 (PST) From: Kevin Grittner Reply-To: Kevin Grittner Subject: Re: Performance bug in prepared statement binding in 9.2? To: Tom Lane , Josh Berkus Cc: Andres Freund , Andrew Dunstan , Jeff Janes , Amit Kapila , "pgsql-performance@postgresql.org" In-Reply-To: <24236.1383940000@sss.pgh.pa.us> MIME-Version: 1.0 Content-Type: text/plain; charset=iso-8859-1 Content-Transfer-Encoding: quoted-printable X-Pg-Spam-Score: -2.0 (--) List-Archive: List-Help: List-ID: List-Owner: List-Post: List-Subscribe: List-Unsubscribe: X-Mailing-List: pgsql-performance Precedence: bulk Sender: pgsql-performance-owner@postgresql.org Tom Lane wrote: > I wonder if we could ameliorate this problem by making > get_actual_variable_range() use SnapshotDirty > In that thread I claimed that a current MVCC snapshot was the > most appropriate thing, which it probably is; If it reads from the end of the index, won't it actually be reading starting with the value we will obtain using SnapshotDirty, and since the transaction is not yet committed, won't we be making the trip to the heap for each index tuple we read from that point?=A0 Why doesn't that make SnapshotDirty more appropriate for purposes of cost estimation? > but the argument for it isn't so strong that I think we should be > willing to spend unbounded effort to get that version of the > column min/max rather than some other approximation. Since the whole point is to try to get the fastest runtime which produces correct results, I agree even if the other value is in some way more "correct". > The best objection to it that I can see is Robert's security > concern about leakage of uncommitted values --- but I don't think > that holds a huge amount of water either. It doesn't look like Robert did either, if you read the whole message.=A0 In fact, he also questioned why index tuples which would need to be read if we process from that end of the index don't matter for purposes of cost estimation. -- Kevin Grittner EDB: http://www.enterprisedb.com The Enterprise PostgreSQL Company --=20 Sent via pgsql-performance mailing list (pgsql-performance@postgresql.org) To make changes to your subscription: http://www.postgresql.org/mailpref/pgsql-performance