Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA384:256) (Exim 4.89) (envelope-from ) id 1elQLp-0007cP-RY for pgsql-bugs@arkaria.postgresql.org; Tue, 13 Feb 2018 02:29:45 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.84_2) (envelope-from ) id 1elQLo-0002dW-NI for pgsql-bugs@arkaria.postgresql.org; Tue, 13 Feb 2018 02:29:44 +0000 Received: from magus.postgresql.org ([2a02:c0:301:0:ffff::29]) by malur.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA384:256) (Exim 4.84_2) (envelope-from ) id 1elQLo-0002dM-I0 for pgsql-bugs@lists.postgresql.org; Tue, 13 Feb 2018 02:29:44 +0000 Received: from sss.pgh.pa.us ([66.207.139.130]) by magus.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA384:256) (Exim 4.89) (envelope-from ) id 1elQLk-0008Gs-VC for pgsql-bugs@postgresql.org; Tue, 13 Feb 2018 02:29:44 +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 w1D2TXhR030154; Mon, 12 Feb 2018 21:29:33 -0500 From: Tom Lane To: =?gb2312?B?yq/Twrui?= cc: pgsql-bugs@postgresql.org Subject: Re: response time is very long in PG9.5.5 using psql or jdbc In-reply-to: <72aa8c39225549dd8c1d18f96df8b1e3@pingan.com.cn> References: <72aa8c39225549dd8c1d18f96df8b1e3@pingan.com.cn> Comments: In-reply-to =?gb2312?B?yq/Twrui?= message dated "Mon, 12 Feb 2018 15:02:04 +0000" MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-ID: <30152.1518488973.1@sss.pgh.pa.us> Date: Mon, 12 Feb 2018 21:29:33 -0500 Message-ID: <30153.1518488973@sss.pgh.pa.us> List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Precedence: bulk =?gb2312?B?yq/Twrui?= writes: > In our product database,we met a problem .when we login in the database > using psql or jdbc ,the response time is very long. I'm going to guess that this has something to do with very slow population of the backend's internal caches during the first query of a session. That suggests bloated system catalogs. Do you have an unusually large number of database objects (e.g., millions of tables or functions)? Or is it possible that some transaction(s) transiently created a lot of objects, and vacuuming hasn't been able to shrink the catalogs back down? regards, tom lane