pg.ddx.io  pgsql-performance@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Tom Lane <tgl@sss.pgh.pa.us>
To: Christoph Berg <christoph.berg@credativ.de>
Cc: PostgreSQL Performance <pgsql-performance@postgresql.org>
Subject: Re: RT3.4 query needed a lot more tuning with 9.2 than it did with 8.1
Date: Mon, 06 May 2013 12:38:48 -0400
Message-ID: <1583.1367858328@sss.pgh.pa.us> (raw)
In-Reply-To: <20130430112055.GA27525@msgid.df7cb.de>
References: <20130430112055.GA27525@msgid.df7cb.de>
List-Unsubscribe:  <mailto:majordomo@postgresql.org?body=unsub%20pgsql-performance>

Christoph Berg <christoph.berg@credativ.de> writes:
> We recently (finally) migrated an Request Tracker 3.4 database running
> on 8.1.19 to 9.2.4. The queries used by rt3.4 are sometimes weird, but
> 8.1 coped without too much tuning. The schema looks like this:

The newer rowcount estimates are much further away from reality:

>  Unique  (cost=1117.67..1118.46 rows=9 width=1115) (actual time=82.646..85.695 rows=439 loops=1)

>  Unique  (cost=784205.94..796940.08 rows=145533 width=1061) (actual time=9710.683..9713.175 rows=439 loops=1)

Has the new DB been analyzed?  Maybe you had custom stats targets in
the old DB that didn't get copied to the new one?

			regards, tom lane


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



view thread (11+ messages)  latest in thread

Message-ID: <1583.1367858328@sss.pgh.pa.us>
Permalink:  ../1583.1367858328@sss.pgh.pa.us/
Also on:    postgresql.org/message-id/1583.1367858328@sss.pgh.pa.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 using the --to and --cc options:
  reply via email

  To: pgsql-performance@postgresql.org
  Cc: tgl@sss.pgh.pa.us, christoph.berg@credativ.de
  Subject: Re: RT3.4 query needed a lot more tuning with 9.2 than it did with 8.1
  In-Reply-To: <1583.1367858328@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