pg.ddx.io pgsql-performance@postgresql.org mailing list archive
help / color / mirror / Atom feed From: Tom Lane <tgl@sss.pgh.pa.us>
To: Robert Haas <robertmhaas@gmail.com>
Cc: Cédric Villemain <cedric.villemain.debian@gmail.com>
Cc: Kevin Grittner <Kevin.Grittner@wicourts.gov>
Cc: Mladen Gogala <mladen.gogala@vmsinfo.com>
Cc: pgsql-performance@postgresql.org <pgsql-performance@postgresql.org>
Subject: Re: anti-join chosen even when slower than old plan
Date: Fri, 12 Nov 2010 11:43:05 -0500
Message-ID: <11745.1289580185@sss.pgh.pa.us> (raw )
In-Reply-To: <AANLkTikt06NuAxmbvFbQv62Dz6zDgU6PJhj8YMUjmxZi@mail.gmail.com >
References: <4CD9663502000025000374B1@gw.wicourts.gov >
<20961.1289347680@sss.pgh.pa.us >
<4CDA62C60200002500037512@gw.wicourts.gov >
<AANLkTi=eNXKEBo5dXJDd4+aHhfmkibH++fqjj12+DA3o@mail.gmail.com >
<4CDACBBF020000250003755B@gw.wicourts.gov >
<4CDB7BAA.7020506@vmsinfo.com >
<4CDBB0A40200002500037571@gw.wicourts.gov >
<AANLkTi=dzhRTTNm1LkyNCAC5+PWbp1jWtKFh4T1Bu4nj@mail.gmail.com >
<18450.1289499783@sss.pgh.pa.us >
<19088.1289501929@sss.pgh.pa.us >
<AANLkTi=dnDwLEyxienHs7ZGP1k18YQzaQMPY7KP-hjMT@mail.gmail.com >
<19796.1289504156@sss.pgh.pa.us >
<AANLkTinNTG_kR_WiRWqJdgTe18Ghdxj6bmLR3OU70oqN@mail.gmail.com >
<AANLkTimRqw+vd=83=RW3VbX8U_4fVJDpJZfMxa6uLvs3@mail.gmail.com >
<AANLkTikt06NuAxmbvFbQv62Dz6zDgU6PJhj8YMUjmxZi@mail.gmail.com >
Robert Haas <robertmhaas@gmail.com> writes:
> On Fri, Nov 12, 2010 at 4:15 AM, Cédric Villemain
> <cedric.villemain.debian@gmail.com> wrote:
>>> I wondering if we could do something with a formula like 3 *
>>> amount_of_data_to_read / (3 * amount_of_data_to_read +
>>> effective_cache_size) = percentage NOT cached. That is, if we're
>>> reading an amount of data equal to effective_cache_size, we assume 25%
>>> caching, and plot a smooth curve through that point. In the examples
>>> above, we would assume that a 150MB read is 87% cached, a 1GB read is
>>> 50% cached, and a 3GB read is 25% cached.
>> But isn't it already the behavior of effective_cache_size usage ?
> No.
I think his point is that we already have a proven formula
(Mackert-Lohmann) and shouldn't be inventing a new one out of thin air.
The problem is to figure out what numbers to apply the M-L formula to.
I've been thinking that we ought to try to use it in the context of the
query as a whole rather than for individual table scans; the current
usage already has some of that flavor but we haven't taken it to the
logical conclusion.
> The ideal of trying to know what is actually in cache strikes me as an
> almost certain non-starter.
Agreed on that point. Plan stability would go out the window.
regards, tom lane
view thread (62+ messages) latest in thread
Message-ID: <11745.1289580185@sss.pgh.pa.us>
Permalink: ../11745.1289580185@sss.pgh.pa.us/
Also on: postgresql.org/message-id/11745.1289580185@sss.pgh.pa.us
copy link · copy postgr.es
reply Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Reply to all the recipients using the --to and --cc options:
reply via email
To: pgsql-performance@postgresql.org
Cc: tgl@sss.pgh.pa.us, robertmhaas@gmail.com, cedric.villemain.debian@gmail.com, Kevin.Grittner@wicourts.gov, mladen.gogala@vmsinfo.com
Subject: Re: anti-join chosen even when slower than old plan
In-Reply-To: <11745.1289580185@sss.pgh.pa.us>
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox