Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtp (Exim 4.80) (envelope-from ) id 1XAW9A-0005jd-QG for pgsql-performance@arkaria.postgresql.org; Fri, 25 Jul 2014 03:26:17 +0000 Received: from localhost ([127.0.0.1] helo=postgresql.org) by malur.postgresql.org with smtp (Exim 4.80) (envelope-from ) id 1XAW99-0001X0-Ln for pgsql-performance@arkaria.postgresql.org; Fri, 25 Jul 2014 03:26:15 +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 1XAW98-0001Wt-65 for pgsql-performance@postgresql.org; Fri, 25 Jul 2014 03:26:14 +0000 Received: from mail-pd0-x231.google.com ([2607:f8b0:400e:c02::231]) by makus.postgresql.org with esmtps (TLS1.0:RSA_AES_256_CBC_SHA1:256) (Exim 4.80) (envelope-from ) id 1XAW94-0002jH-Lt for pgsql-performance@postgresql.org; Fri, 25 Jul 2014 03:26:12 +0000 Received: by mail-pd0-f177.google.com with SMTP id p10so4832655pdj.22 for ; Thu, 24 Jul 2014 20:26:07 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=from:message-id:date:user-agent:mime-version:to:cc:subject :references:in-reply-to:content-type:content-transfer-encoding; bh=5XuWApdglP3gOnRDlHm2nEz4XktsGpwViDxS27t2Ocs=; b=CDCLWejq9DiqswtBaFy+4163CyLZbY7M88j+fhQ7ur72cdDfi0o+CSuPBrr/cHWeBi 6CyexwG4BdY0JfstnNobQHYFkIJJArEPGsqzsOv503ymBjWrYe3Pv1LLTyPObKbaHy5t YzjC6JyDsrULhF0yHCVgr9zK8wwEGEDBbSeeZrLCL5mkiNArGmE70qmbvwkwJUhYSwSS zOS5pc4pjF2LhKyAk/F65EyUkSX+rSxeF/EHlq+uYZqNeC1hYxu/0ZLqpMTHHES97+mk 5W19GjUyyENoWe700wmx/Ki07hDdkCXPQJGri0WQI0oOB8zx7b+FgqHrZZPGAkWx/CNY 4rVw== X-Received: by 10.66.178.231 with SMTP id db7mr1181162pac.63.1406258767199; Thu, 24 Jul 2014 20:26:07 -0700 (PDT) Received: from [192.168.2.105] ([116.226.65.195]) by mx.google.com with ESMTPSA id i2sm9574269pdk.70.2014.07.24.20.26.04 for (version=TLSv1.2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Thu, 24 Jul 2014 20:26:06 -0700 (PDT) From: Rural Hunter X-Google-Original-From: Rural Hunter Message-ID: <53D1CE4B.4020104@gmail.com> Date: Fri, 25 Jul 2014 11:26:03 +0800 User-Agent: Mozilla/5.0 (Windows NT 6.1; WOW64; rv:31.0) Gecko/20100101 Thunderbird/31.0 MIME-Version: 1.0 To: Tom Lane CC: pgsql-performance@postgresql.org Subject: Re: Very slow planning performance on partition table References: <53CFB6BC.4050606@gmail.com> <25010.1406253203@sss.pgh.pa.us> In-Reply-To: <25010.1406253203@sss.pgh.pa.us> Content-Type: text/plain; charset=gb18030; format=flowed Content-Transfer-Encoding: 7bit X-Pg-Spam-Score: -2.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 2014/7/25 9:53, Tom Lane wrote: > Rural > [ shrug... ] Insufficient data. When I try a simple test case based on > what you've told us, I get planning times of a couple of milliseconds. > I can think of contributing factors that would increase that, but not by > four orders of magnitude. So there's something very significant that > you've left out. Can you construct a self-contained test case that's > this slow? > > regards, tom lane > No I cann't. I exported the db schema(without data) to another server and there is no problem. Is the planning time related to data volume? Anything else can I check? I already checked the default statistics target and it's the default value. I did change some statistics target on one column of the table, but the column is not involved in the slow planning query. -- Sent via pgsql-performance mailing list (pgsql-performance@postgresql.org) To make changes to your subscription: http://www.postgresql.org/mailpref/pgsql-performance