Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtp (Exim 4.80) (envelope-from ) id 1XF1pZ-00053q-CS for pgsql-performance@arkaria.postgresql.org; Wed, 06 Aug 2014 14:04:41 +0000 Received: from localhost ([127.0.0.1] helo=postgresql.org) by malur.postgresql.org with smtp (Exim 4.80) (envelope-from ) id 1XF1pY-0008Vg-RY for pgsql-performance@arkaria.postgresql.org; Wed, 06 Aug 2014 14:04:40 +0000 Received: from makus.postgresql.org ([2001:4800:1501:1::229]) by malur.postgresql.org with esmtps (TLS1.2:DHE_RSA_AES_256_CBC_SHA256:256) (Exim 4.80) (envelope-from ) id 1XF1pX-0008Va-Q1 for pgsql-performance@postgresql.org; Wed, 06 Aug 2014 14:04:39 +0000 Received: from nm9.bullet.mail.ne1.yahoo.com ([98.138.90.72]) by makus.postgresql.org with esmtps (TLS1.2:DHE_RSA_AES_256_CBC_SHA256:256) (Exim 4.80) (envelope-from ) id 1XF1pT-0004fD-4y for pgsql-performance@postgresql.org; Wed, 06 Aug 2014 14:04:38 +0000 Received: from [98.138.226.179] by nm9.bullet.mail.ne1.yahoo.com with NNFMP; 06 Aug 2014 14:04:32 -0000 Received: from [98.138.89.160] by tm14.bullet.mail.ne1.yahoo.com with NNFMP; 06 Aug 2014 14:04:32 -0000 Received: from [127.0.0.1] by omp1016.mail.ne1.yahoo.com with NNFMP; 06 Aug 2014 14:04:32 -0000 X-Yahoo-Newman-Property: ymail-3 X-Yahoo-Newman-Id: 618946.23341.bm@omp1016.mail.ne1.yahoo.com Received: (qmail 19888 invoked by uid 60001); 6 Aug 2014 14:04:32 -0000 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=yahoo.com; s=s1024; t=1407333872; bh=XhqTYKS4YASjMelkWLnTLo3vdBgjMFH7BXbbFjaVeR0=; h=References:Message-ID:Date:From:Reply-To:Subject:To:In-Reply-To:MIME-Version:Content-Type:Content-Transfer-Encoding; b=YjaUwyEw7arOsqRYkCosf+y0N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IgKGJ1dCBzdGlsbCBub3QgZ29vZCkKCkFzIGhhcyBhbHJlYWR5IGJlZW4gc3VnZ2VzdGVkLCB0aGF0IGRpZmZlcmVuY2UgaXMgYWxtb3N0IGNlcnRhaW5seSAKZHVlIHRvIGRpZmZlcmVuY2VzIGluIGhvdyBtdWNoIG9mIHRoZSBuZWNlc3NhcnkgZGF0YSBpcyBjYWNoZWQgb3IgCndoYXQgdGhlIHF1ZXJ5IGlzIGNvbXBldGluZyB3aXRoLgoKPiBEb2VzIGFueW8BMAEBAQE- X-Mailer: YahooMailWebService/0.8.198.689 References: Message-ID: <1407333872.37969.YahooMailNeo@web122303.mail.ne1.yahoo.com> Date: Wed, 6 Aug 2014 07:04:32 -0700 From: Kevin Grittner Reply-To: Kevin Grittner Subject: Re: Query performing very bad and sometimes good To: Andreas Joseph Krogh , "pgsql-performance@postgresql.org" In-Reply-To: MIME-Version: 1.0 Content-Type: text/plain; charset=iso-8859-1 Content-Transfer-Encoding: quoted-printable X-Pg-Spam-Score: -1.9 (-) List-Archive: List-Help: List-ID: List-Owner: List-Post: List-Subscribe: List-Unsubscribe: X-Mailing-List: pgsql-performance Precedence: bulk Sender: pgsql-performance-owner@postgresql.org Andreas Joseph Krogh wrote: > Some-times it performs much better (but still not good) As has already been suggested, that difference is almost certainly=20 due to differences in how much of the necessary data is cached or=20 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.=A0 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.=A0 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 --=20 Sent via pgsql-performance mailing list (pgsql-performance@postgresql.org) To make changes to your subscription: http://www.postgresql.org/mailpref/pgsql-performance