Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtps (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1mcmyW-0005sg-PF for pgsql-performance@arkaria.postgresql.org; Tue, 19 Oct 2021 11:08:09 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.92) (envelope-from ) id 1mcmyV-0007NE-OP for pgsql-performance@arkaria.postgresql.org; Tue, 19 Oct 2021 11:08:07 +0000 Received: from magus.postgresql.org ([2a02:c0:301:0:ffff::29]) by malur.postgresql.org with esmtps (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1mcmyV-0007N5-Be for pgsql-performance@lists.postgresql.org; Tue, 19 Oct 2021 11:08:07 +0000 Received: from post.visena.com ([46.226.10.50]) by magus.postgresql.org with esmtps (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1mcmyT-0001eK-Fp for pgsql-performance@lists.postgresql.org; Tue, 19 Oct 2021 11:08:07 +0000 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=visena.com; s=20141101.wh; h=Content-Type:MIME-Version:Subject:References:In-Reply-To: Message-ID:Cc:To:From:Date:Sender:Reply-To:Content-Transfer-Encoding: Content-ID:Content-Description:Resent-Date:Resent-From:Resent-Sender: Resent-To:Resent-Cc:Resent-Message-ID:List-Id:List-Help:List-Unsubscribe: List-Subscribe:List-Post:List-Owner:List-Archive; bh=DqHADqeJg9yCUkmMibxDnSEzmq5NWyaQQa5q47znRlU=; b=fFVigWaOUVK0pXBp0nvFmzU/l7 9d0xX75JBfO3GXh6UqUIZzdJGeGLbo9j0Vj6uu7purkO/t/kOV6YX+zE3X9Co8hl0kGdpCzpYUw5S VddNWpsM8EZ8inYRFHo16ZBq1Uq1ZlfWqwNzxACe+xfByEthnTGIdHku2pCBieL89B00=; Received: from batch01.services.internal.visena.net ([10.3.0.103]) by post.visena.com with utf8esmtp (Exim 4.93) (envelope-from ) id 1mcmyR-00Crzl-JV; Tue, 19 Oct 2021 13:08:03 +0200 Received: from localhost ([127.0.0.1] helo=batch01.services.internal.visena.net) by batch01.services.internal.visena.net with utf8esmtp (Exim 4.93) (envelope-from ) id 1mcmyR-001Cy9-AB; Tue, 19 Oct 2021 13:08:03 +0200 Date: Tue, 19 Oct 2021 13:08:03 +0200 (CEST) From: Andreas Joseph Krogh To: aditya desai Cc: Pgsql Performance Message-ID: In-Reply-To: References: Subject: Sv: Fwd: Query out of memory MIME-Version: 1.0 Content-Type: multipart/mixed; boundary="----=_Part_1088_1582712640.1634641683223" X-Mailer: Visena Mail 3.0.90 List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Archived-At: Precedence: bulk ------=_Part_1088_1582712640.1634641683223 Content-Type: multipart/related; boundary="----=_Part_1089_704639998.1634641683223" ------=_Part_1089_704639998.1634641683223 Content-Type: multipart/alternative; boundary="----=_Part_1090_130129923.1634641683245" ------=_Part_1090_130129923.1634641683245 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable P=C3=A5 tirsdag 19. oktober 2021 kl. 07:58:46, skrev aditya desai < admad123@gmail.com >:=20 Sending to a performance group instead of PLPGSQL. .=20 .=20 Hi,=20 I am running the below query. Table has 21 million records. I get an Out Of= =20 Memory error after a while.(from both pgadmin and psql). Can someone review= DB=20 parameters given below.=20 select t.*,g.column,a.column from=20 gk_staging g, transaction t,account a=20 where=20 g.accountcodeis not null AND=20 g.accountcode::text <> '' AND=20 length(g.accountcode)=3D13 AND=20 g.closeid::text=3Dt.transactionid::text AND=20 subsrting(g.accountcode::text,8)=3Da.mask_code::text=20 Below are system parameters.=20 shared_buffers=3D3GB=20 work_mem=3D2GB=20 effective_cache_size=3D10GB=20 maintenance_work_mem=3D1GB=20 max_connections=3D250=20 I am unable to paste explain plan here due to security concerns.=20 You have not provided schema, explain-output nor the error-message.=20 Without this it's pretty much guess-work...=20 -- Andreas Joseph Krogh=20 ------=_Part_1090_130129923.1634641683245 Content-Type: text/html;charset=UTF-8 Content-Transfer-Encoding: quoted-printable
P=C3=A5 tirsdag 19. oktober 2021 kl. 07:58:46, skrev aditya desai <= admad123@gmail.com>:
Sending to a performance group instead of PLPGSQL.
=C2=A0
.
.
Hi,
I am running the below query. Table has 21 million records. I get an O= ut Of Memory error after a while.(from both pgadmin and psql). Can someone = review DB parameters given below.
=C2=A0
select t.*,g.column,a.column from
gk_staging g, transaction t,account a
where
g.accountcodeis not null AND
g.accountcode::text <> '' AND
length(g.accountcode)=3D13 AND
g.closeid::text=3Dt.transactionid::text AND
subsrting(g.accountcode::text,8)=3Da.mask_code::text
=C2=A0
Below are system parameters.
shared_buffers=3D3GB
work_mem=3D2GB
effective_cache_size=3D10GB
maintenance_work_mem=3D1GB
max_connections=3D250
=C2=A0
I am unable to paste explain plan here due to security concerns.
=C2=A0
You have not provided schema, explain-output nor the error-message.
Without this it's pretty much guess-work...
">
=C2=A0
--
Andreas Joseph Krogh
------=_Part_1090_130129923.1634641683245-- ------=_Part_1089_704639998.1634641683223-- ------=_Part_1088_1582712640.1634641683223--