Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtp (Exim 4.80) (envelope-from ) id 1Weucw-0005ru-7H for pgsql-performance@arkaria.postgresql.org; Mon, 28 Apr 2014 23:06:22 +0000 Received: from localhost ([127.0.0.1] helo=postgresql.org) by malur.postgresql.org with smtp (Exim 4.80) (envelope-from ) id 1Weucv-0006fx-O3 for pgsql-performance@arkaria.postgresql.org; Mon, 28 Apr 2014 23:06:21 +0000 Received: from makus.postgresql.org ([2001:4800:7903:4::125]) by malur.postgresql.org with esmtp (Exim 4.80) (envelope-from ) id 1Weucu-0006fq-GG for pgsql-performance@postgresql.org; Mon, 28 Apr 2014 23:06:20 +0000 Received: from sss.pgh.pa.us ([66.207.139.130]) by makus.postgresql.org with esmtp (Exim 4.80) (envelope-from ) id 1Weucn-0005th-R9 for pgsql-performance@postgresql.org; Mon, 28 Apr 2014 23:06:19 +0000 Received: from sss1.sss.pgh.pa.us (localhost [127.0.0.1]) by sss.pgh.pa.us (8.14.4/8.14.4) with ESMTP id s3SN66jN030076; Mon, 28 Apr 2014 19:06:06 -0400 From: Tom Lane To: Michael van Rooyen cc: pgsql-performance@postgresql.org Subject: Re: Slow queries on 9.3.1 despite use of index In-reply-to: <535EC680.6010102@loot.co.za> References: <535E8BFF.1010503@loot.co.za> <23166.1398707420@sss.pgh.pa.us> <535EC680.6010102@loot.co.za> Comments: In-reply-to Michael van Rooyen message dated "Mon, 28 Apr 2014 23:22:08 +0200" Date: Mon, 28 Apr 2014 19:06:06 -0400 Message-ID: <30075.1398726366@sss.pgh.pa.us> X-Pg-Spam-Score: -2.6 (--) 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 Michael van Rooyen writes: > On 2014/04/28 07:50 PM, Tom Lane wrote: >> Hm ... it seems pretty suspicious that all of these examples take just >> about exactly 1 second longer than you might expect. I'm wondering >> if there is something sitting on an exclusive table lock somewhere, >> and releasing it after 1 second. > I do have log_min_duration_statement = 1000, which may cause this. Ah, I overlooked that detail. Never mind that theory then. Although it might still be worth turning on log_lock_waits for awhile, just to eliminate the possibility of lock-induced delays. regards, tom lane -- Sent via pgsql-performance mailing list (pgsql-performance@postgresql.org) To make changes to your subscription: http://www.postgresql.org/mailpref/pgsql-performance