Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtp (Exim 4.72) (envelope-from ) id 1Um3F1-0004Hg-Vn for pgsql-bugs@arkaria.postgresql.org; Mon, 10 Jun 2013 14:38:40 +0000 Received: from localhost ([127.0.0.1] helo=postgresql.org) by malur.postgresql.org with smtp (Exim 4.72) (envelope-from ) id 1Um3F1-00034Z-GD for pgsql-bugs@arkaria.postgresql.org; Mon, 10 Jun 2013 14:38:39 +0000 Received: from magus.postgresql.org ([2a02:c0:301:0:ffff::29]) by malur.postgresql.org with esmtp (Exim 4.72) (envelope-from ) id 1Um3F0-00034Q-Tt for pgsql-bugs@postgresql.org; Mon, 10 Jun 2013 14:38:38 +0000 Received: from moutng.kundenserver.de ([212.227.17.10]) by magus.postgresql.org with esmtp (Exim 4.80) (envelope-from ) id 1Um3Ew-0008FE-TJ for pgsql-bugs@postgresql.org; Mon, 10 Jun 2013 14:38:38 +0000 Received: from anarazel.de (p5DDC60C8.dip0.t-ipconnect.de [93.220.96.200]) by mrelayeu.kundenserver.de (node=mreu2) with ESMTP (Nemesis) id 0MgaRP-1UyNAN3hBP-00NP0f; Mon, 10 Jun 2013 16:38:33 +0200 Received: by anarazel.de (Postfix, from userid 1000) id C6D22100459; Mon, 10 Jun 2013 16:38:41 +0200 (CEST) Date: Mon, 10 Jun 2013 16:38:41 +0200 From: Andres Freund To: Gunnlaugur Thor Briem Cc: pgsql-bugs@postgresql.org Subject: Re: pg_dump is O(N) in DB table count N even if dumping only one table Message-ID: <20130610143841.GC5680@awork2.anarazel.de> References: <20130610140843.GA5680@awork2.anarazel.de> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: X-Provags-ID: V02:K0:q9XVj9o99R8ShcnBMdgH5MKeWEJrByVbOydKbt3okBK a1WfSTQbLXKPii3ioGxPRSf1FYcSI7twuiKSjw15iH5T63E3Ay bSI/ikqCugaF0Dw6c3/bZEinWvWQpl9+f+MwK3LVmsV5WHTjsG p+OUNZWmcgeY28NwWJ8w5+tY8yx9NWsFyyu04c3/F8S06jWxr6 TrnX4YvPKZOVf8r/ohERrn4JM0NPzRwc/PGfC7wFDduJO/cAVk vGsHlDUQQ4igNGtgr8sHTVgqPiej9BCLdt0hu5Ko9MrvY9peb7 L6v1VLm7zsSoTGcOht6lWF3s8y2YY68oze7R9nUgV5ME0aH7Ve w5EChUlJ2q/EGqYXyhQaTYmyUT3OvZ+B6dcf0/rG6 X-Pg-Spam-Score: -1.9 (-) List-Archive: List-Help: List-ID: List-Owner: List-Post: List-Subscribe: List-Unsubscribe: X-Mailing-List: pgsql-bugs Precedence: bulk Sender: pgsql-bugs-owner@postgresql.org Hi, On 2013-06-10 14:24:14 +0000, Gunnlaugur Thor Briem wrote: > So I ran this again locally on the production server: > > duration: 16012.518 ms statement: SELECT c.tableoid, c.oid, c.relname, ... > duration: 16516.708 ms statement: SELECT tableoid, oid, typname, ... > duration: 13400.694 ms statement: SELECT classid, objid, refclassid, ... > > Duration decrease is probably *not* significantly due to a warmer cache, > because I had two runs over the slow network and their durations were > similar (actually longer the second time). Hm. 13s for pg_depend locally vs 55s remotely. You need to have a tremendous amount of dependencies. Could you do a count(*) of pg_depend, pg_type and pg_class? Greetings, Andres Freund -- Andres Freund http://www.2ndQuadrant.com/ PostgreSQL Development, 24x7 Support, Training & Services -- Sent via pgsql-bugs mailing list (pgsql-bugs@postgresql.org) To make changes to your subscription: http://www.postgresql.org/mailpref/pgsql-bugs