Link to home
Start Free TrialLog in
Avatar of pooja74
pooja74

asked on

Query taking very long time to run

My following query is taking very long time to run.Please suggest the ways to tune this query.
Key1 and key2 are indexed columns.tab2 is a partitioned table.tab1 is in other schema.

Select

 CREDITORS_MEETING_STATUS_CD,

TRANSFER,

FLG,


from tab1@mdm.com  a,

     tab2 b

where a.key1=b.key2

and program_id=1;

It takes hours to run.
Thanks in advance.

 

ASKER CERTIFIED SOLUTION
Avatar of morphman
morphman

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Avatar of morphman
morphman

Another alternative would be to create a local copy of tab1@mdm.com before running this query (via materialized views or any other replication technique), and then you can query 2 tables on the same database which will obviosly be much quicker.
SOLUTION
Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
SOLUTION
Avatar of Murali Murugesan
Murali Murugesan
Flag of Australia image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial