pg.ddx.io  pgsql-performance@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Bruce Momjian <bruce@momjian.us>
To: Andrew Dunstan <andrew@dunslane.net>
Cc: Tom Lane <tgl@redhat.com>
Cc: PostgreSQL-development <pgsql-hackers@postgreSQL.org>
Subject: Re: [PERFORM] encouraging index-only scans
Date: Wed, 12 Dec 2012 21:48:37 -0500
Message-ID: <20121213024837.GB22363@momjian.us> (raw)
In-Reply-To: <50C904DB.9090305@dunslane.net>
References: <50C8F1EC.9010801@dunslane.net>
	<15321.1355347953@sss.pgh.pa.us>
	<50C90154.8060103@dunslane.net>
	<50C904DB.9090305@dunslane.net>
List-Unsubscribe: <mailto:majordomo@postgresql.org?body=unsub%20pgsql-hackers>

On Wed, Dec 12, 2012 at 05:27:39PM -0500, Andrew Dunstan wrote:
> 
> On 12/12/2012 05:12 PM, Andrew Dunstan wrote:
> >
> >On 12/12/2012 04:32 PM, Tom Lane wrote:
> >>Andrew Dunstan <andrew@dunslane.net> writes:
> >>>A client is testing a migration from 9.1 to 9.2, and has found that a
> >>>large number of queries run much faster if they use index-only scans.
> >>>However, the only way he has found to get such a plan is by increasing
> >>>the seq_page_cost to insanely high levels (3.5). Is there any approved
> >>>way to encourage such scans that's a but less violent than this?
> >>Is the pg_class.relallvisible estimate for the table realistic? They
> >>might need a few more VACUUM and ANALYZE cycles to get it into the
> >>neighborhood of reality, if not.
> >
> >That was the problem - I didn't know this hadn't been done.
> >
> 
> Actually, the table had been analysed but not vacuumed, so this
> kinda begs the question what will happen to this value on
> pg_upgrade? Will people's queries suddenly get slower until
> autovacuum kicks in on the table?

[ moved to hackers list.]

Yes, this does seem like a problem for upgrades from 9.2 to 9.3?  We can
have pg_dump --binary-upgrade set these, or have ANALYZE set it.   I
would prefer the later.

-- 
  Bruce Momjian  <bruce@momjian.us>        http://momjian.us
  EnterpriseDB                             http://enterprisedb.com

  + It's impossible for everything to be true. +


-- 
Sent via pgsql-hackers mailing list (pgsql-hackers@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-hackers



view thread (64+ messages)  latest in thread

Message-ID: <20121213024837.GB22363@momjian.us>
Permalink:  ../20121213024837.GB22363@momjian.us/
Also on:    postgresql.org/message-id/20121213024837.GB22363@momjian.us

 · 

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 from your mail client; the link fills in
  the headers below: reply via email
  Some clients, webmail especially, drop In-Reply-To and References from
  a link, and the reply then starts a new thread: use the mbox below.

  To: pgsql-performance@postgresql.org
  Cc: bruce@momjian.us, andrew@dunslane.net, tgl@redhat.com, pgsql-hackers@postgreSQL.org
  Subject: Re: [PERFORM] encouraging index-only scans
  In-Reply-To: <20121213024837.GB22363@momjian.us>
  References: <50C8F1EC.9010801@dunslane.net> <15321.1355347953@sss.pgh.pa.us> <50C90154.8060103@dunslane.net> <50C904DB.9090305@dunslane.net> <20121213024837.GB22363@momjian.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