Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.94.2) (envelope-from ) id 1sEm37-003XiP-PU for pgsql-general@arkaria.postgresql.org; Wed, 05 Jun 2024 08:31:15 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.94.2) (envelope-from ) id 1sEm37-006gtJ-RJ for pgsql-general@arkaria.postgresql.org; Wed, 05 Jun 2024 08:31:13 +0000 Received: from makus.postgresql.org ([2001:4800:3e1:1::229]) by malur.postgresql.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.94.2) (envelope-from ) id 1sEm37-006grF-DI for pgsql-general@lists.postgresql.org; Wed, 05 Jun 2024 08:31:13 +0000 Received: from mout.gmx.net ([212.227.15.15]) by makus.postgresql.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.94.2) (envelope-from ) id 1sEm32-003YF2-1y for pgsql-general@lists.postgresql.org; Wed, 05 Jun 2024 08:31:12 +0000 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmx.net; s=s31663417; t=1717576265; x=1718181065; i=shammat@gmx.net; bh=8As5xt+K0IG8VXLOFy2UHTYwU0/bkpWY990tNN7RCVM=; h=X-UI-Sender-Class:Message-ID:Date:MIME-Version:Subject:To: References:From:In-Reply-To:Content-Type: Content-Transfer-Encoding:cc:content-transfer-encoding: content-type:date:from:message-id:mime-version:reply-to:subject: to; b=OCE9BDORyoabctmpS15USMwwOU9uKTEhrwfbWNgfFFMuSKBL7b7sT/6KRROnermO qCuB/uYMtYfTLyx/R4P9sGNzlaA63x09hwt/+rbEe1hs1JYaWwLq6JBuiZ7CpHmAF X8+G51tE2Ogn60x3qrAPd/PYI6h5QKhZE4Gw8hY8ckgYkY+ucToWgfWqHs1kvxqkr xZWycb5n5Upe+EOeNXfUQENyTvPgnfObKNkm3J4FUoUqwAVC8Rf3vwt2U2Rry4aJi ZfX+6PYB6Ul54JxApTCERDEWEVXEe0M1r4pDKlScT0a/OMhIif9637agecd2ksWPy ztbQlx6cj5wpDgZbAw== X-UI-Sender-Class: 724b4f7f-cbec-4199-ad4e-598c01a50d3a Received: from [10.8.0.152] ([185.40.248.10]) by mail.gmx.net (mrgmx005 [212.227.17.190]) with ESMTPSA (Nemesis) id 1N7zBR-1sSzE33WEd-0154aV for ; Wed, 05 Jun 2024 10:31:04 +0200 Message-ID: Date: Wed, 5 Jun 2024 10:31:04 +0200 MIME-Version: 1.0 User-Agent: Mozilla Thunderbird Subject: Re: Poor performance after restoring database from snapshot on AWS RDS To: pgsql-general@lists.postgresql.org References: Content-Language: de-DE From: Shammat In-Reply-To: Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable X-Provags-ID: V03:K1:UGcdEb2WqX6JK4bzEQ8jY2WQyvE/HO5bOI9l2jsGadoliA20aEa W8ckg1m+eKgBe8+z9UOpj6zttSeh8hNrKui5ZFEnVefsxNGQujLHcnpDrzsXNSSk7/gSoSg /DU4OJay146JY1KyjsMJ3QjYVntas84hzcgg1GZEhZNl9EYQYf5+KszK56ImZyMdmAODnMP PZwYBhsMh41oUjxEyz2gQ== X-Spam-Flag: NO UI-OutboundReport: notjunk:1;M01:P0:fx9Jzzcqwas=;uDtSM6AEgg6urMz8+6UdrLdnopN OXNWRI8znlGBRJdXGsaSr9GbanEL64nWlyueiSzJ8AgeDF8czXwHPeOr6MuUID3P8TezYdlVZ CNfHsAhRUDFAyI0wzuGxFvpAKNdQyUqTgL37BXaygtXx0ltBb8n4TN+e0D+EVq677JyhdKa5h zY3sxmvI8MduyRQSoh2B0qgKDNDsth3CSRJcvZy+KnBc2lDtcN89iEhv7D/sbrG0m+eTMQM+m RzDVOdHrynBZx0811l670yutgrl028OcJTIrF8yubv5sH5X6h6wJWj2e/lsMCEEhhRL2uDH5n 3AzMGRQPhJ0e7DEgBcDQqwYqg9ENarqiSB3STUNjDqaVcSNrzW7rI66jpxN02n/T//lO8w7Lk zWJmCh+sKaKLNAnPzClNCG/Jtt1Yj6HssacMMjKmFRwMDx0cURKKzAkKx41/syizcFVJt9qpy 4Y8YmmQ0eYImjwUzqun3BcfXzxBApji7Shskz8IqFYlxjKfP3kvx3/d5nHWze0gBSMd+DpEss XrcNWiN2es5LibuInRcyKuEEZObktP44gAJ5iAionKhECYLWjVUSQaFlTfkoppAhHtbAZa0fk vhmxE2A/8P28OXb0ZDdc0of+a0uAiotxJqN5JYh0Pxr5A0m9dFeWdfyvaZnshgtC596Q/6zP/ UNH7BO2U99uDxxOZ+uEu97YvnFR1aG24zB+4zfAR7t0EPBOWplDrSqqKYiD7mq/vWnrcN1A/K ivcVQCE0AWU112mY1RXqLUQOA+TYGaCE9JkxYDr98vKxSBEs/mYKkd5H9ktNGT8GLqBGxghiw qVf4CNeujhr5f5ZFwJ3rFlO+GB7C6hYyE69O9WggmcK1g= List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Archived-At: Precedence: bulk Sam Kidman schrieb am 03.06.2024 um 10:06: > We get very poor performance in the staging environment after this > restore takes place - after some usage it seems to get better perhaps > because of caching. > > The staging RDS instance is a smaller size than production (it has > 32GB ram and 8 vCPU vs production's 128GB ram and 32 vCPU) but the > performance seems to much worse than this decrease in resources would > account for. > > I have seen some advice that vacuum analyze should be run after the > snapshot restore but I thought this was supposed to happen > automatically. If we did run it manually how would that help? autovacuum will kick in eventually - but only after some time (which is what you are seeing). In general after a bulk load (e.g. restore of a backup or importing data in any other way) running vacuum to udpate statistics is highly recommended