I need someone who can help me to tune my query. In my query I am using two tables( only two) which exists in remote database. This query performance is very slow in the local database. but when I run this query at remote database it is very fast.
Any suggestion!!!
ppa has 11 millon rows
pac has 1 million rows
SELECT pac.segment1, decode(pac.segment1,'O','2','V','3','D','4','X')
FROM ps_temp1 ppa,
ps_temp2 pac
WHERE
ppa.person_id = 500
AND ppa.analysis_criteria_id = pac.analysis_criteria_id
AND pac.id_flex_num = 100
AND pac.segment1 IS NOT NULL
Any suggestion!!!
ppa has 11 millon rows
pac has 1 million rows
SELECT pac.segment1, decode(pac.segment1,'O','2','V','3','D','4','X')
FROM ps_temp1 ppa,
ps_temp2 pac
WHERE
ppa.person_id = 500
AND ppa.analysis_criteria_id = pac.analysis_criteria_id
AND pac.id_flex_num = 100
AND pac.segment1 IS NOT NULL