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 1hfnsi-00062X-Kl for pgsql-performance@arkaria.postgresql.org; Tue, 25 Jun 2019 16:01:16 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.89) (envelope-from ) id 1hfnsh-0006XH-32 for pgsql-performance@arkaria.postgresql.org; Tue, 25 Jun 2019 16:01:15 +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 1hfnsg-0006XA-Ib for pgsql-performance@lists.postgresql.org; Tue, 25 Jun 2019 16:01:14 +0000 Received: from mail-io1-xd2c.google.com ([2607:f8b0:4864:20::d2c]) by makus.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA1:256) (Exim 4.89) (envelope-from ) id 1hfnsc-0007ML-C7 for pgsql-performance@lists.postgresql.org; Tue, 25 Jun 2019 16:01:13 +0000 Received: by mail-io1-xd2c.google.com with SMTP id r185so60449iod.6 for ; Tue, 25 Jun 2019 09:01:10 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=telsasoft-com.20150623.gappssmtp.com; s=20150623; h=date:from:to:cc:subject:message-id:references:mime-version :content-disposition:in-reply-to:user-agent; bh=FMDdsKGe2Ru3o45XebwlL/2AncYYLVDtIgowjq8hUak=; b=vg6eIEKwysJMBqjKoo5uGXvS5U8vWy13jSJsK0VV2Yqf7tIa3yRWSvEyWYIri/65+i 7XV44cDkblblHanai5N4RkTWTG9cWCexBBbMmb8jCCfMiv55VFVXarB83B7stcuzg6J7 eKAALRxAQ7KD3yebXOKuNJQ7nDb40aR1siN1mAaaONqFHTFy9hhI71MxPd3HpA2XuNsV FwHYgT5R/pUdbAJxdcxYjzsJ5hvpqAvKjmLq8I87s6wW9eXDNNfDPxQ+xuydaIjwKcaj pbV9g6AOqpqEWw+seP29E82Ztyno7EssKxZ1yNos8Ni8wuPLUfaPSpa19QnZWepiMoEF SqRg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:date:from:to:cc:subject:message-id:references :mime-version:content-disposition:in-reply-to:user-agent; bh=FMDdsKGe2Ru3o45XebwlL/2AncYYLVDtIgowjq8hUak=; b=CG7dm2JwrXQ2AbfTeDkSYbjm7EFKnBRJ4+ikbrLfsNBOaZUd/X2YxuJEaVTm2jCGPT Bz90tG5Zz5LA056TSUiGQaMUOelW8DzLqJ6ksAecpVhFRvz1LCj1JfQC8tIGa9JzewEo b/lLF3gW2s1APYBXc+fGDphdARmAzTifB8zjRgNWUm+pr8OOeJw5veI7BZMrSV1RZNXx tZNolsksXaEZ1HdSVcjCDR/DhTARylAfuJ+XkhftR0CteMdsYVZdndRO9qSdXrBS/r4R SUoV4FyHas3+3171hTrIhb9ZHkmmnL2Eq9XaQAWRsKP7vqewRm0HPDXtY3FOaxE1QpiW HxpQ== X-Gm-Message-State: APjAAAVO4+tYo65gTz6CWf2MDv9vZJNR7uV6lIeiFhTzADpVpxe9Yy/R 7JazNku3YmDoEEjI+guW0jNKZAutGrg= X-Google-Smtp-Source: APXvYqw9IVsxiBDWvmbuMgpIcN7U2i4Uo4adL8heyAzK5rtqHshWGTrO++8csQWu5fCCuVmVOC8A6A== X-Received: by 2002:a5d:87c6:: with SMTP id q6mr39405282ios.115.1561478468661; Tue, 25 Jun 2019 09:01:08 -0700 (PDT) Received: from pryzbyj (charmander.telsasoft.com. [50.244.222.1]) by smtp.gmail.com with ESMTPSA id z26sm15812177ioi.85.2019.06.25.09.01.07 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Tue, 25 Jun 2019 09:01:08 -0700 (PDT) Received: by pryzbyj (Postfix, from userid 1000) id F24788006DE; Tue, 25 Jun 2019 11:01:06 -0500 (CDT) Date: Tue, 25 Jun 2019 11:01:06 -0500 From: Justin Pryzby To: Benjamin Scherrey Cc: Hugh Ranalli , pgsql-performance@lists.postgresql.org Subject: Re: Perplexing, regular decline in performance Message-ID: <20190625160106.GD18602@telsasoft.com> References: MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.5.24 (2015-08-30) List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Precedence: bulk On Tue, Jun 25, 2019 at 10:55:22PM +0700, Benjamin Scherrey wrote: > Have you done a VACUUM ANALYZE FULL on your database? This needs to be done > periodically to inform the server of the statistics of how the data and > relations are distributed across the database. I think this is wrong. VACUUM and ANALYZE are good, but normally happen automatically by autovacuum. VACUUM FULL takes an exclusive lock on the table, and rewrites its data and indices from scratch. It's not normally necessary at all. It's probably most useful to recover from badly-bloated table if autovacuum didn't run often enough, in which case the permanent solution is to change autovacuum settings to be more aggressive. Don't confuse with VACUUM FREEZE, which doesn't require exclusive lock, and normally not necessary if autovacuum is working properly. Justin