Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtp (Exim 4.80) (envelope-from ) id 1Wet0W-00025X-Mn for pgsql-performance@arkaria.postgresql.org; Mon, 28 Apr 2014 21:22:36 +0000 Received: from localhost ([127.0.0.1] helo=postgresql.org) by malur.postgresql.org with smtp (Exim 4.80) (envelope-from ) id 1Wet0V-0007UU-80 for pgsql-performance@arkaria.postgresql.org; Mon, 28 Apr 2014 21:22:35 +0000 Received: from magus.postgresql.org ([2a02:c0:301:0:ffff::29]) by malur.postgresql.org with esmtp (Exim 4.80) (envelope-from ) id 1Wet0G-00078A-0E for pgsql-performance@postgresql.org; Mon, 28 Apr 2014 21:22:20 +0000 Received: from www.loot.co.za ([41.185.56.26] helo=mail.loot.co.za) by magus.postgresql.org with esmtp (Exim 4.80) (envelope-from ) id 1Wet0C-0004Wu-Kj for pgsql-performance@postgresql.org; Mon, 28 Apr 2014 21:22:19 +0000 Received: from sun.loot.co.za (sun [192.168.0.14]) by mail.loot.co.za (8.13.8/8.13.8) with SMTP id s3SLLL4Y015342 for ; Mon, 28 Apr 2014 23:21:27 +0200 DomainKey-Signature: a=rsa-sha1; s=mail; d=loot.co.za; c=nofws; q=dns; b=UALKfPIqIsO07FiCX2KyVAMwKhWwaHKUq1kM6cC4evLbEjld2BvSbpkcUW1NcXr8X Phkb+YJy4CAXxu9iZxHYLVEO8lrFQBKdwjsZ8CV9pMk0WxtpnZrtLq5j4+F3Qnm Received: (qmail 13902 invoked from network); 28 Apr 2014 21:22:08 -0000 Received: from unknown (HELO ?192.168.0.2?) (192.168.0.2) by 0 with SMTP; 28 Apr 2014 21:22:08 -0000 Message-ID: <535EC680.6010102@loot.co.za> Date: Mon, 28 Apr 2014 23:22:08 +0200 From: Michael van Rooyen User-Agent: Mozilla/5.0 (Windows NT 6.1; WOW64; rv:24.0) Gecko/20100101 Thunderbird/24.4.0 MIME-Version: 1.0 To: Tom Lane CC: pgsql-performance@postgresql.org Subject: Re: Slow queries on 9.3.1 despite use of index References: <535E8BFF.1010503@loot.co.za> <23166.1398707420@sss.pgh.pa.us> In-Reply-To: <23166.1398707420@sss.pgh.pa.us> Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit X-Pg-Spam-Score: -5.0 (-----) 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 On 2014/04/28 07:50 PM, Tom Lane wrote: > Michael van Rooyen writes: >> I'm trying to get to the bottom of a performance issue on a server >> running PostgreSQL 9.3.1 on Centos 5. > 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. > In particular, this looks quite a bit like the old behavior of autovacuum > when it was trying to truncate empty pages off the end of a relation --- > it would hold off other accesses to the table until deadlock_timeout > elapsed, whereupon it'd get kicked off the exclusive lock (and have to > retry the truncation next time). Are you *sure* this server is running > 9.3.1, and not something pre-9.3? Definitely 9.3.1. The strange thing is I have other servers with similar configurations and load and with the same database, where performance is great, so it's hard for me to know what's different here. Maybe I'm expecting too much from these SATA drives, or it's time to add lots of RAM... -- Sent via pgsql-performance mailing list (pgsql-performance@postgresql.org) To make changes to your subscription: http://www.postgresql.org/mailpref/pgsql-performance