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 1sgMaJ-001BOX-BU for pgsql-general@arkaria.postgresql.org; Tue, 20 Aug 2024 10:59:31 +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 1sgMaG-00EjZV-3u for pgsql-general@arkaria.postgresql.org; Tue, 20 Aug 2024 10:59:28 +0000 Received: from magus.postgresql.org ([2a02:c0:301:0:ffff::29]) by malur.postgresql.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.94.2) (envelope-from ) id 1sgMaF-00EjZN-N7 for pgsql-general@lists.postgresql.org; Tue, 20 Aug 2024 10:59:28 +0000 Received: from mail-lf1-x12a.google.com ([2a00:1450:4864:20::12a]) by magus.postgresql.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256 (Exim 4.94.2) (envelope-from ) id 1sgMaC-000b9M-Nf for pgsql-general@lists.postgresql.org; Tue, 20 Aug 2024 10:59:27 +0000 Received: by mail-lf1-x12a.google.com with SMTP id 2adb3069b0e04-5332f488c6eso4787989e87.1 for ; Tue, 20 Aug 2024 03:59:25 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1724151565; x=1724756365; darn=lists.postgresql.org; h=cc:to:subject:message-id:date:from:in-reply-to:references :mime-version:from:to:cc:subject:date:message-id:reply-to; bh=tcLYStagAyloGi0OXbN6XGUZtav1pWcdfZ8CHgLDLGY=; b=griNZW8CxMlalLres74sL7Vw/EHTstkSGtAM1nMcBZGC+96ZB8y21ydXy2m5GSPpo6 TVvvTNZrvm6KSpuZrHs8h34rZlgR/3bLPui5iz1JDs4qy+5aZ/EzeH/ab2f48Uk9vXye P0UFT78L6TSMA2ViEUpeEozUgJ6VvBM3hV8ymfmn/kmhJDiucVIq0eLlo2ahC0y9JxVp zH3eyhalpaNaqY90eCtaf1C99HaNGbfRitb36elsit0ruPpIICtz1iOM82I/P1Gix0ZJ htbqcDojfERuZNUw/y6+nMa+F+9Ku6U2BZZrRXCZRfZaqAsWBzhUG42OMD3p0giPraNa /x+g== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1724151565; x=1724756365; h=cc:to:subject:message-id:date:from:in-reply-to:references :mime-version:x-gm-message-state:from:to:cc:subject:date:message-id :reply-to; bh=tcLYStagAyloGi0OXbN6XGUZtav1pWcdfZ8CHgLDLGY=; b=vHBmU7L7H+xCanAuU1tBByUK3QtHcJG92K6csdLvTt7nDxmpogRQ/lZi//NoCujNmD QEHxxCpbRe1emqo3/G2IJhVPJKu5gp2NOot0kPnqPTn0WWi3fdc6AKYRe9gwxsdJr1UX g1F7dHos1f6Yu2S9yV+1ZJOYFS8v6G62Hx4Geq+BKh7QjivgS+gDRap/YLaj30p7tCpn zCREEBGM8myrABaFZETd/eRfGc3j0OgZbFU3tQ9nzGPxmmNeho1vgGMEqKpQGK1u0dLm r++WN8mBnMFXT1F5xH9q/SMz0E4MNyzXxplJjBfQKB0yKdYLl/bgW2x07xd5Ibf5nEPs pjaA== X-Gm-Message-State: AOJu0YzHCP5tiyogtlvIK0C3+vXyGU9mKHDk09sInmlT3CyUlD7yzKWM TDTrgeUXeRrdRsh2Ol6clTuSA3E40NJjh+Z5xjN9nqtN/gllnoGhsA9VEAtItNXmd2r38+mKkdZ m/AC0v+KftvTLMwXXcMHUI/+MSp8= X-Google-Smtp-Source: AGHT+IG5ONRVeK3esxMHBWfR1zgXF2nD8LiRxzy9+vS665oEHLsnI90bEQwroYi3WX7qztwykUS/9WCBaXLTTxtuvYY= X-Received: by 2002:a05:6512:684:b0:52f:cd03:a84a with SMTP id 2adb3069b0e04-5331c6dbd0fmr11496462e87.39.1724151564238; Tue, 20 Aug 2024 03:59:24 -0700 (PDT) MIME-Version: 1.0 References: In-Reply-To: From: Muhammad Ikram Date: Tue, 20 Aug 2024 15:59:13 +0500 Message-ID: Subject: Re: Insert query performance To: sud Cc: pgsql-general Content-Type: multipart/alternative; boundary="000000000000868ae206201b5135" List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Archived-At: Precedence: bulk --000000000000868ae206201b5135 Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable It will record all statements in logs. If you are concerned about query times then you may use pg_stat_statements. Muhammad Ikram On Tue, 20 Aug 2024 at 12:19, sud wrote: > > On Mon, Aug 19, 2024 at 1:25=E2=80=AFPM Muhammad Ikram wrote: > >> Hi Sud, >> >> Please make following change in your postgresql.conf file >> >> log_statement =3D 'all' >> >> > Will this put all the internal sql query or the recursive query entries i= n > the pg_stats_statement view which we can analyze then? And also to debug > issues in the production will it be a good idea to set it for a few times > and then turn it off or it can have significant performance overhead. > --000000000000868ae206201b5135 Content-Type: text/html; charset="UTF-8" Content-Transfer-Encoding: quoted-printable
It will record all statements in logs. If you are concern= ed about query times then you may use pg_stat_statements.


Muhammad Ikram



On Tue, 20 Aug 2024 at 12:19, sud <suds1434@gmail.com> wrote:

On Mon, Aug 19, 2024 at 1:25=E2=80=AFPM = Muhammad Ikram <m= mikram@gmail.com> wrote:
Hi Sud,

Please make fol= lowing change in your postgresql.conf file

log_sta= tement =3D 'all'=C2=A0

<= div>
Will this put all the internal sql query or the recursiv= e query entries in the pg_stats_statement view which we can analyze then? A= nd also to debug issues in the production will it be a good idea to set it = for a few times and then turn it off or it can have significant=C2=A0perfor= mance overhead.
--000000000000868ae206201b5135--