Need assistance in converting subqueries to joins

From: Siraj G <tosiraj(dot)g(at)gmail(dot)com>
To: pgsql-general(at)lists(dot)postgresql(dot)org
Subject: Need assistance in converting subqueries to joins
Date: 2024-09-20 04:07:31
Message-ID: CAC5iy60YRzqRSyC=hAZneURdCTAsRPH313jJzK9gF6-nkvwGPA@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

Hello Tech gents!

I am sorry if I am asking the wrong question to this group, but wanted
assistance in converting a query replacing subqueries with joins.

Please find the query below (whose cost is very high):

select em_exists_id from IS_SEC_FILT WHERE (IS_SEC_FILT_GUID) NOT IN
(SELECT IS_OBJ_GUID FROM TMP_IS_SEC_FILT T0, IS_PROJ P0 WHERE
T0.IS_PROJ_GUID = P0.IS_PROJ_GUID AND P0.IS_PROJ_ID =
IS_SEC_FILT.IS_PROJ_ID) AND (IS_PROJ_ID) IN (SELECT IS_PROJ_ID FROM IS_PROJ
P0, TMP_IS_SEC_FILT T0, EM_MD R0 WHERE T0.IS_REPOSITORY_GUID = R0.REP_GUID
AND T0.IS_PROJ_GUID = P0.IS_PROJ_GUID AND P0.IS_REPOSITORY_ID = R0.REP_ID);

Regards
Siraj

Responses

Browse pgsql-general by date

  From Date Subject
Next Message Adrian Klaver 2024-09-20 04:19:16 Re: Need assistance in converting subqueries to joins
Previous Message Durgamahesh Manne 2024-09-19 19:57:56 Synchronize the dump with a logical slot with --snapshot