Re: Nested loop and simple join query - slow after upgrade to 9.2

From: Jeff Janes <jeff(dot)janes(at)gmail(dot)com>
To: alexandre - aldeia digital <adaldeia(at)gmail(dot)com>
Cc: pgsql-performance(at)postgresql(dot)org
Subject: Re: Nested loop and simple join query - slow after upgrade to 9.2
Date: 2013-01-25 18:29:28
Message-ID: CAMkU=1zJ14Vki5zOXtaw7Q_8s4w=nUarfgx4n8SuRAxVOiayyQ@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-performance

On Fri, Jan 25, 2013 at 7:34 AM, alexandre - aldeia digital
<adaldeia(at)gmail(dot)com> wrote:
> Hi,
>
> Last weekend, we upgrade a PG from 8.4 to 9.2 version (full
> pg_dump/restore/vacuum/analyze). After this, some simple join querys
> became very slow, maybe because the use of nested loops. Bellow, an example
> with nestedloop on and off:

What happens if you bump up default_statistics_target by a factor of
10 or 100 and redo the analyze?

Here it is finding 39 times more rows than expected:

Index Scan using ad_pc13t3_modpadrao on pc13t3 t1 (cost=0.00..6.21
rows=1 width=65) (actual time=0.090..0.252 rows=39 loops=1)

It would interesting to know why that is.

Cheers,

Jeff

In response to

Responses

Browse pgsql-performance by date

  From Date Subject
Next Message alexandre - aldeia digital 2013-01-25 19:30:41 Re: Nested loop and simple join query - slow after upgrade to 9.2
Previous Message alexandre - aldeia digital 2013-01-25 15:34:15 Nested loop and simple join query - slow after upgrade to 9.2