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 1jew3B-0005CL-PH for pgsql-performance@arkaria.postgresql.org; Sat, 30 May 2020 07:37:02 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.92) (envelope-from ) id 1jew39-0003ZD-OQ for pgsql-performance@arkaria.postgresql.org; Sat, 30 May 2020 07:36:59 +0000 Received: from makus.postgresql.org ([2001:4800:3e1:1::229]) by malur.postgresql.org with esmtps (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1jew39-0003Z5-Ab for pgsql-performance@lists.postgresql.org; Sat, 30 May 2020 07:36:59 +0000 Received: from sonic312-22.consmr.mail.bf2.yahoo.com ([74.6.128.84]) by makus.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.92) (envelope-from ) id 1jew32-00019p-0V for pgsql-performance@lists.postgresql.org; Sat, 30 May 2020 07:36:57 +0000 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=yahoo.com; s=s2048; t=1590824209; bh=zV6iMEzwk79UPtarY4Ol8WDQ2NPLN5etdJRfkm7M9lM=; h=Date:From:To:Subject:References:From:Subject; b=U0LJn/rdS3gNRPRIfcTC6mrgmTq619AT5Jmq4xEHE+qz+6jRMhym1UizTT7yyDMPqO9j/C2oPUxyt9YaPrJASfxkSaetldXmjHhldkN5qPvVZBy8CuO036lLiUV/eTRSxRESczTj53BePCVhXcMC5d4aE6/RLyXYEvYC1bOxPzFUnScloQI/2P5mz1XN3fz9V7t5RV1vLyn+ojlim525LnGjls0PepYesLqk4Jn7FrFPpx2iq4tfkjvJ8tDBa8WZbQRwU1TG/Oj/41er/UFg0IwxICNaxoMlLxye4poFZu8Fd7muPx9CNVhYlGGR+2rFYk9YDZp6T/lcycGM1H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j.SAjshbw7FsriuEgencsZzqIOpMF9Teo_9py77PS73qBboEUST1e006SJJw7gJjTR5UhF9Sb7 sNwGv6o_wh8fYCIGFtamSIJQ82WPWSe5OcFYocPDngLsPq3fjFMldqecDBosKs_3vF8CeBoabHhA 6hXJlfxz5cszjX8jpk7SeAzZAVehcMo_ihsLPGx72VFAOWFEyHe2cKzK15XvOLkMCgTB9fejQBd4 hw9onDHc8FtV5pmaPZ8HQxoboaHPMV.2v9l3GLZf5WLm2An8XiWpXwWuK6nWQ6OWrgUcBJmNuO6H Jh4rHuzECM2agxbRvpcYG Received: from sonic.gate.mail.ne1.yahoo.com by sonic312.consmr.mail.bf2.yahoo.com with HTTP; Sat, 30 May 2020 07:36:49 +0000 Date: Sat, 30 May 2020 07:36:49 +0000 (UTC) From: sugnathi hai To: "pgsql-performance@lists.postgresql.org" Message-ID: <975278223.51863.1590824209351@mail.yahoo.com> Subject: Performance tunning MIME-Version: 1.0 Content-Type: multipart/alternative; boundary="----=_Part_51862_1334182512.1590824209350" References: <975278223.51863.1590824209351.ref@mail.yahoo.com> X-Mailer: WebService/1.1.16037 YMailNorrin Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/80.0.3987.162 Safari/537.36 Content-Length: 3379 List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Precedence: bulk ------=_Part_51862_1334182512.1590824209350 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 7bit Hi , Can you help to tune the below plan Limit (cost=0.87..336777.92 rows=100 width=57) (actual time=599302.173..599481.552 rows=100 loops=1) Buffers: shared hit=78496066 -> Nested Loop (cost=0.87..11005874.67 rows=3268 width=57) (actual time=599302.170..599481.506 rows=100 loops=1) Buffers: shared hit=78496066 -> Index Scan using inx_callprocessingstatus_modifieddate on callprocessingstatus contactsta1_ (cost=0.44..2008486.89 rows=15673696 width=16) (actual time=0.356..66774.105 rows=15651059 loops=1) Index Cond: (modifieddate < now()) Filter: ((overallstatus)::text = 'COMPLETED'::text) Rows Removed by Filter: 275880 Buffers: shared hit=15803632 -> Index Scan using "INX_callinfo_Callid" on callinfo contact0_ (cost=0.43..0.57 rows=1 width=49) (actual time=0.033..0.033 rows=0 loops=15651059) Index Cond: (callid = contactsta1_.callid) Filter: ((combinationkey IS NULL) AND (mod(callid, '2'::bigint) = 0)) Rows Removed by Filter: 1 Buffers: shared hit=62692434Planning Time: 1.039 msExecution Time: 599481.758 ms ------=_Part_51862_1334182512.1590824209350 Content-Type: text/html; charset=UTF-8 Content-Transfer-Encoding: 7bit
Hi ,

Can you help to tune the below plan

Limit (cost=0.87..336777.92 rows=100 width=57) (actual time=599302.173..599481.552 rows=100 loops=1) Buffers: shared hit=78496066 -> Nested Loop (cost=0.87..11005874.67 rows=3268 width=57) (actual time=599302.170..599481.506 rows=100 loops=1) Buffers: shared hit=78496066 -> Index Scan using inx_callprocessingstatus_modifieddate on callprocessingstatus contactsta1_ (cost=0.44..2008486.89 rows=15673696 width=16) (actual time=0.356..66774.105 rows=15651059 loops=1) Index Cond: (modifieddate < now()) Filter: ((overallstatus)::text = 'COMPLETED'::text) Rows Removed by Filter: 275880 Buffers: shared hit=15803632 -> Index Scan using "INX_callinfo_Callid" on callinfo contact0_ (cost=0.43..0.57 rows=1 width=49) (actual time=0.033..0.033 rows=0 loops=15651059) Index Cond: (callid = contactsta1_.callid) Filter: ((combinationkey IS NULL) AND (mod(callid, '2'::bigint) = 0)) Rows Removed by Filter: 1 Buffers: shared hit=62692434 Planning Time: 1.039 ms Execution Time: 599481.758 ms

------=_Part_51862_1334182512.1590824209350--