pg.ddx.io pgsql-performance@postgresql.org mailing list archive
help / color / mirror / Atom feed From: Jesper Krogh <jesper@krogh.cc>
To: Greg Smith <greg@2ndquadrant.com>
Cc: Craig Ringer <craig@postnewspapers.com.au>
Cc: Cédric Villemain <cedric.villemain.debian@gmail.com>
Cc: Josh Berkus <josh@agliodbs.com>
Cc: pgsql-performance@postgresql.org
Subject: Re: reducing random_page_cost from 4 to 2 to force index scan
Date: Mon, 16 May 2011 06:41:58 +0200
Message-ID: <4DD0AB16.5060808@krogh.cc> (raw )
In-Reply-To: <4DD07B4E.1020503@2ndquadrant.com >
References: <BANLkTikZhYc+h1=YDJfXwZEZc1tN3_VwCg@mail.gmail.com >
<4DB6F4BB020000250003CEB9@gw.wicourts.gov >
<BANLkTindB68ogMg8zrR7GrYEV+mQQddj0A@mail.gmail.com >
<BANLkTik6OaVkJGEjs5--vcynUE36mWbzbg@mail.gmail.com >
<2823.1305314437@sss.pgh.pa.us >
<BANLkTimTqXAy7_KqQz_OW1RvMbDd9ojfqg@mail.gmail.com >
<4DCD90F5.2010501@agliodbs.com >
<BANLkTikcVUeRfocJPe_W+jfi5k1+gcLnxg@mail.gmail.com >
<4DD0195A.9040305@agliodbs.com >
<BANLkTika=a95=Pm97Evi-Q7e_9vs4FnkCQ@mail.gmail.com >
<4DD07855.8080907@postnewspapers.com.au >
<4DD07B4E.1020503@2ndquadrant.com >
On 2011-05-16 03:18, Greg Smith wrote:
> You can't do it in real-time. You don't necessarily want that to
> even if it were possible; too many possibilities for nasty feedback
> loops where you always favor using some marginal index that happens
> to be in memory, and therefore never page in things that would be
> faster once they're read. The only reasonable implementation that
> avoids completely unstable plans is to scan this data periodically
> and save some statistics on it--the way ANALYZE does--and then have
> that turn into a planner input.
Would that be feasible? Have process collecting the data every now-and-then
probably picking some conservative-average function and feeding
it into pg_stats for each index/relation?
To me it seems like a robust and fairly trivial way to to get better
numbers. The
fear is that the OS-cache is too much in flux to get any stable numbers out
of it.
--
Jesper
view thread (43+ messages) latest in thread
Message-ID: <4DD0AB16.5060808@krogh.cc>
Permalink: ../4DD0AB16.5060808@krogh.cc/
Also on: postgresql.org/message-id/4DD0AB16.5060808@krogh.cc
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: jesper@krogh.cc, greg@2ndquadrant.com, craig@postnewspapers.com.au, cedric.villemain.debian@gmail.com, josh@agliodbs.com
Subject: Re: reducing random_page_cost from 4 to 2 to force index scan
In-Reply-To: <4DD0AB16.5060808@krogh.cc>
* 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