Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtp (Exim 4.80) (envelope-from ) id 1aMcnr-0001Q4-B8 for pgsql-performance@arkaria.postgresql.org; Fri, 22 Jan 2016 14:35:07 +0000 Received: from localhost ([127.0.0.1] helo=postgresql.org) by malur.postgresql.org with smtp (Exim 4.84) (envelope-from ) id 1aMcnq-0007oR-U7 for pgsql-performance@arkaria.postgresql.org; Fri, 22 Jan 2016 14:35:06 +0000 Received: from makus.postgresql.org ([2001:4800:1501:1::229]) by malur.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA384:256) (Exim 4.84) (envelope-from ) id 1aMcnq-0007ny-CN for pgsql-performance@postgresql.org; Fri, 22 Jan 2016 14:35:06 +0000 Received: from sss.pgh.pa.us ([66.207.139.130]) by makus.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA384:256) (Exim 4.84) (envelope-from ) id 1aMcnn-0005D0-Oj for pgsql-performance@postgresql.org; Fri, 22 Jan 2016 14:35:05 +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 u0MEZ1a8000404; Fri, 22 Jan 2016 09:35:01 -0500 From: Tom Lane To: Albe Laurenz cc: "'Phil S *EXTERN*'" , "pgsql-performance@postgresql.org" Subject: Re: High Planning Time In-reply-to: References: Comments: In-reply-to Albe Laurenz message dated "Fri, 22 Jan 2016 07:59:59 +0000" Date: Fri, 22 Jan 2016 09:35:01 -0500 Message-ID: <403.1453473301@sss.pgh.pa.us> 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 Albe Laurenz writes: > Phil S wrote: >> explain analyze >> select * from message >> limit 1 >> >> "Limit (cost=0.00..0.44 rows=1 width=1517) (actual time=0.009..0.009 rows=1 loops=1)" >> " -> Seq Scan on message (cost=0.00..28205.48 rows=64448 width=1517) (actual time=0.007..0.007 >> rows=1 loops=1)" >> "Planning time: 3667.361 ms" >> "Execution time: 1.652 ms" >> >> As you can see the query is simple and does not justify 3 seconds of planning time. It would appear >> that there is an issue with my configuration but I am not able to find anything that looks out of >> sorts in the query planning configuration variables. Any advice about what I should be looking for to >> fix this would be appreciated. > This is odd. > Could you profile the backend during such a statement to see where the time is spent? I'm wondering about locks. Perhaps turning on log_lock_waits would yield useful info. 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