Re: Query completed in < 1s in PG 9.1 and ~ 700s in PG 9.2

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: Rodrigo Rosenfeld Rosas <rr(dot)rosas(at)gmail(dot)com>
Cc: Merlin Moncure <mmoncure(at)gmail(dot)com>, pgsql-performance(at)postgresql(dot)org
Subject: Re: Query completed in < 1s in PG 9.1 and ~ 700s in PG 9.2
Date: 2012-11-06 19:24:34
Message-ID: 17866.1352229874@sss.pgh.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-performance

Rodrigo Rosenfeld Rosas <rr(dot)rosas(at)gmail(dot)com> writes:
> Em 06-11-2012 16:42, Merlin Moncure escreveu:
>> Hm -- looking at your 'slow' 9.2 query, it is reporting that the query
>> took 3 seconds (reported times are in milliseconds). How are you
>> timing the data? What happens when you run explain analyze
>> <your_query> from psql (as in, how long does it take)?

> The time I reported in the tables of my first message were the time
> reported by pgAdmin3 (compiled from source).

> But I get similar time when I run like this:

> time psql -p 5432 -f slow.sql db_name > slow-9.2-again.explain

> real 1m56.353s
> user 0m0.068s
> sys 0m0.020s

> slow-9.2-again.explain: http://explain.depesz.com/s/zF1

But that again shows only five seconds runtime. If you repeat the query
several dozen times in a row, run the same way each time, do you get
consistent timings?

Can you put together a self-contained test case to duplicate these
results? I'm prepared to believe there's some sort of planner
regression involved here, but we'll never find it without a test case.

regards, tom lane

In response to

Responses

Browse pgsql-performance by date

  From Date Subject
Next Message Rodrigo Rosenfeld Rosas 2012-11-06 19:31:15 Re: Query completed in < 1s in PG 9.1 and ~ 700s in PG 9.2
Previous Message Gunnar "Nick" Bluth 2012-11-06 19:08:26 Re: Re: Increasing work_mem and shared_buffers on Postgres 9.2 significantly slows down queries