Re: Slow query after upgrade from 9.0 to 9.2

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On 10.01.2013 19:17, Jeff Janes wrote:
> On Thu, Jan 10, 2013 at 5:32 AM, Andrzej Zawadzki <zawadaa@xxxxx> 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@xxxxxxxxxxxxxx)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-performance


[Postgresql General]     [Postgresql PHP]     [PHP Users]     [PHP Home]     [PHP on Windows]     [Kernel Newbies]     [PHP Classes]     [PHP Books]     [PHP Databases]     [Yosemite]

  Powered by Linux