pg.ddx.io  pgsql-performance@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Andrzej Zawadzki <zawadaa@wp.pl>
To: Jeff Janes <jeff.janes@gmail.com>
Cc: pgsql-performance@postgresql.org
Subject: Re: Slow query after upgrade from 9.0 to 9.2
Date: Fri, 11 Jan 2013 09:13:37 +0100
Message-ID: <50EFC9B1.5060604@wp.pl> (raw)
In-Reply-To: <CAMkU=1wFT5q_XyQstPMA-nw5kiC4f_uwZg_YgLpLoN=LDrtT3g@mail.gmail.com>
References: <50EEC2D5.3050602@wp.pl>
	<CAMkU=1wFT5q_XyQstPMA-nw5kiC4f_uwZg_YgLpLoN=LDrtT3g@mail.gmail.com>
List-Unsubscribe:  <mailto:majordomo@postgresql.org?body=unsub%20pgsql-performance>

On 10.01.2013 19:17, Jeff Janes wrote:
> On Thu, Jan 10, 2013 at 5:32 AM, Andrzej Zawadzki <zawadaa@wp.pl> wrote:
>> Why that's happens? All configurations are identical. Only engine is
>> different.
> Could you post explain (analyze, buffers) instead of just explain?
Impossible, 1h of waiting and I've killed that.
> Also, if you temporarily set enable_seqscan=off on 9.2, what plan do
> you then get?

Plan is different.

"Index Scan using sygma_arrear_credit_id on sygma_arrear sar 
(cost=11.07..390.66 rows=1 width=265)"
"  Index Cond: (credit_id = 3102309)"
"  Filter: ((arrear_import_id = $0) AND (arrear_flag_id = 2))"
"  InitPlan 1 (returns $0)"
"    ->  Limit  (cost=0.00..11.07 rows=1 width=8)"
"          ->  Nested Loop  (cost=0.00..54961299.49 rows=4963314 width=8)"
"                Join Filter: (sa.arrear_import_id = ai.id)"
"                ->  Index Scan Backward using report_date_bank_id_key
on arrear_import ai  (cost=0.00..62.81 rows=469 width=8)"
"                      Filter: (import_type_id = 1)"
"                ->  Materialize  (cost=0.00..574515.68 rows=6138000
width=4)"
"                      ->  Index Scan using
sygma_arrear_arrear_import_id_idx on sygma_arrear sa 
(cost=0.00..519848.68 rows=6138000 width=4)"
"                            Filter: (arrear_flag_id = 2)"

The real query is still slow.

-- 
Andrzej Zawadzki


-- 
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 (6+ messages)  latest in thread

Message-ID: <50EFC9B1.5060604@wp.pl>
Permalink:  ../50EFC9B1.5060604@wp.pl/
Also on:    postgresql.org/message-id/50EFC9B1.5060604@wp.pl

 · 

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: zawadaa@wp.pl, jeff.janes@gmail.com
  Subject: Re: Slow query after upgrade from 9.0 to 9.2
  In-Reply-To: <50EFC9B1.5060604@wp.pl>

* 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