Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA1:256) (Exim 4.89) (envelope-from ) id 1hqm2M-0003c0-8a for pgsql-general@arkaria.postgresql.org; Thu, 25 Jul 2019 22:16:34 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.89) (envelope-from ) id 1hqm2J-0007Bh-50 for pgsql-general@arkaria.postgresql.org; Thu, 25 Jul 2019 22:16:31 +0000 Received: from makus.postgresql.org ([2001:4800:3e1:1::229]) by malur.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA1:256) (Exim 4.89) (envelope-from ) id 1hqm2I-0007BZ-O5 for pgsql-general@lists.postgresql.org; Thu, 25 Jul 2019 22:16:30 +0000 Received: from n3.nabble.com ([162.255.23.22]) by makus.postgresql.org with esmtp (Exim 4.92) (envelope-from ) id 1hqm2F-00006n-5B for pgsql-general@postgresql.org; Thu, 25 Jul 2019 22:16:29 +0000 Received: from n3.nabble.com (localhost [127.0.0.1]) by n3.nabble.com (Postfix) with ESMTP id AFFA615C60C7A for ; Thu, 25 Jul 2019 15:16:25 -0700 (MST) Date: Thu, 25 Jul 2019 15:16:25 -0700 (MST) From: PegoraroF10 To: pgsql-general@postgresql.org Message-ID: <1564092985717-0.post@n3.nabble.com> In-Reply-To: <18481dfb-af39-b6a2-7b27-88563cab7134@aklaver.com> References: <1563909633976-0.post@n3.nabble.com> <1563993228524-0.post@n3.nabble.com> <18481dfb-af39-b6a2-7b27-88563cab7134@aklaver.com> Subject: Re: Too slow to create new schema and their tables, functions, triggers. MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Precedence: bulk So, what should I tune on autovacuum ? My script was running strangely. Postgres log shows me the time spent to create functions. That happens when creating triggers and tables too. Sometimes it=C2=B4s too fast and sometimes ... statement: create or replace function valoresdfe... 0 mins 1.135 secs statement: create or replace function dadosorigem... 0 mins 0.055 secs statement: CREATE OR REPLACE FUNCTION SONU... 0 mins 0.013 secs statement: create or replace function contatoscampa...=092 mins 13.492 secs statement: create or replace function FORMATARTELEF... 0 mins 0.013 secs statement: create or replace function ChecaVar 0 mins 0.012 secs statement: CREATE or replace FUNCTION criatrigge... 1 mins 16.42 secs So, is this a vacuum problem ? What do I need to configure it ? And again, if I do a Reindex database before creating that schema, it works perfectly. -- Sent from: https://www.postgresql-archive.org/PostgreSQL-general-f1843780.h= tml