Re: Query performing very bad and sometimes good

From: Kevin Grittner <kgrittn(at)ymail(dot)com>
To: Andreas Joseph Krogh <andreas(at)visena(dot)com>, "pgsql-performance(at)postgresql(dot)org" <pgsql-performance(at)postgresql(dot)org>
Subject: Re: Query performing very bad and sometimes good
Date: 2014-08-06 14:04:32
Message-ID: 1407333872.37969.YahooMailNeo@web122303.mail.ne1.yahoo.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-performance

Andreas Joseph Krogh <andreas(at)visena(dot)com> wrote:

> Some-times it performs much better (but still not good)

As has already been suggested, that difference is almost certainly
due to differences in how much of the necessary data is cached or
what the query is competing with.

> Does anyone see anything obvious or have any hints what to
> investigate further?

We need more information to be able to say much.  Please review
this page:

http://wiki.postgresql.org/wiki/SlowQueryQuestions

Knowing more about the hardware and the tables (including all
indexes) would help a lot, as well as all non-default configuration
settings.  In particular, I'm curious whether there is an index on
the message_id column of origo_email_delivery.

--
Kevin Grittner
EDB: http://www.enterprisedb.com
The Enterprise PostgreSQL Company

In response to

Browse pgsql-performance by date

  From Date Subject
Next Message Evgeniy Shishkin 2014-08-07 23:21:51 two table join with order by on both tables attributes
Previous Message David G Johnston 2014-08-06 00:16:30 Re: Query performing very bad and sometimes good