Re: Query runs forever after upgrading to 9.3

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: "Andrus" <kobruleht2(at)hot(dot)ee>
Cc: pgsql-general(at)postgresql(dot)org
Subject: Re: Query runs forever after upgrading to 9.3
Date: 2013-11-09 20:37:53
Message-ID: 5647.1384029473@sss.pgh.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

"Andrus" <kobruleht2(at)hot(dot)ee> writes:
>> Just out of curiosity, what "earlier version" was that that was able to
>> run this query quickly?

> It was installed in customer site at May 2012 in Windows 2003 server and
> latest RTM version of Postgres
> x32 in this time was used.

That would probably have been 9.1.something, which makes it even less
likely that there was a significant planner difference affecting this.
I wonder if maybe the 9.1 installation had a higher work_mem, or there
was some other configuration setting you forgot to bring forward.
(A higher work_mem might have allowed it to use hashed rather than
simple subplans, which could possibly explain the speed difference.)

> Will your suggestion run faster ? Is it reasonable to switch to use your
> suggestion ?

If you're happy with performance now, there's probably no reason to
mess with it. Changing the query might allow you to skip building
those indexes though, so if that's a pain point then it might be
worth spending more time on.

regards, tom lane

In response to

Browse pgsql-general by date

  From Date Subject
Next Message Gavin Flower 2013-11-10 01:33:06 Re: new line in psotgres
Previous Message Andrus 2013-11-09 20:21:30 Re: Query runs forever after upgrading to 9.3