SQL Performance (MOSC)

MOSC Banner

SQL query tuning

edited Sep 11, 2014 5:01AM in SQL Performance (MOSC) 5 commentsAnswered

Hi All,

Here I have a situation and trying hard to tune this query.

Version: 10.2.0.3

Here is the query:

select kyc_id, gci_number, (case when CLOSE_REQUEST_US='US' then count(gci_number) end)

from

(

select kyc_id, gci_number, (case when CLOSE_REQUEST_US ='YES' then NO else 'US' end)

from

(select distinct 'yes' from

         aml_restriction AR

         where ar.status='A'

           and ar.is_active='Y'

           and ar.location='US'

           and akt.kyc_id = ar.kyc_id

   union

   select distinct 'yes' from

          aml_closure AC

    where ac.status='A'

           and ac.is_active='Y'

           and ac.location='US'

Howdy, Stranger!

Log In

To view full details, sign in to My Oracle Support Community.

Register

Don't have a My Oracle Support Community account? Click here to get started.

Category Leaderboard

Top contributors this month

New to My Oracle Support Community? Visit our Welcome Center

MOSC Help Center