Received: from magus.postgresql.org ([87.238.57.229]) by malur.postgresql.org with esmtp (Exim 4.72) (envelope-from ) id 1TT8QQ-0007mC-HK for pgsql-performance@postgresql.org; Tue, 30 Oct 2012 09:47:58 +0000 Received: from sam.nabble.com ([216.139.236.26]) by magus.postgresql.org with esmtp (Exim 4.72) (envelope-from ) id 1TT8QL-0003vb-D4 for pgsql-performance@postgresql.org; Tue, 30 Oct 2012 09:47:58 +0000 Received: from [192.168.236.26] (helo=sam.nabble.com) by sam.nabble.com with esmtp (Exim 4.72) (envelope-from ) id 1TT8QJ-0003Bw-4E for pgsql-performance@postgresql.org; Tue, 30 Oct 2012 02:47:51 -0700 Date: Tue, 30 Oct 2012 02:47:51 -0700 (PDT) From: AndyG To: pgsql-performance@postgresql.org Message-ID: <1351590470163-5730025.post@n5.nabble.com> In-Reply-To: References: <508F82E1.3020202@orprovision.com> Subject: Re: Slow query, where am I going wrong? MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit X-Pg-Spam-Score: 0.0 (/) X-Archive-Number: 201210/369 X-Sequence-Number: 48328 Thanks very much Laurenz. I'll put your suggestions into motion right away and let you know the results. Albe Laurenz *EXTERN* wrote > BTW, you seem to have an awful lot of indexes defined, some > of which seem redundant. I am in the process of pruning unused/useless indexes on this database - So many of them will be dropped. Most of them are not in production and are past play things on this test system. The actual production test_item table gets about 140k inserts a day (avg). Having this test system slow, dirty and bloated is quite good as it helps us identify potential bottlenecks before they hit production. Partitioning is also on the cards, but solving this current issue is only going to help. Thanks again. Andy -- View this message in context: http://postgresql.1045698.n5.nabble.com/Slow-query-where-am-I-going-wrong-tp5730015p5730025.html Sent from the PostgreSQL - performance mailing list archive at Nabble.com.