Tuning a small query [message #360224] |
Thu, 20 November 2008 02:02 |
magesh_magi1
Messages: 4 Registered: November 2008
|
Junior Member |
|
|
Hi All,
Please help me in Tuning a simple query
Select * from tab1@dblink
where tab1.col1 in ( selct col1 from tab2)
Tab2 is having very less number of records where as Tab1 is having millions of records.
Index is not there in col1 in both the tables where as index is there for some other columns
We cannot join the tables, we may have duplicates in tab2
Tried some Hints but with no Result.
Thanks,
Mag
|
|
|
|
|
|
|
|
Re: Tuning a small query [message #360285 is a reply to message #360280] |
Thu, 20 November 2008 05:02 |
magesh_magi1
Messages: 4 Registered: November 2008
|
Junior Member |
|
|
This is how i formed the query
SELECT /*+ driving_site(A) */ count(*) FROM CCS_file_note@EDCMFGP1 A
WHERE CCS_CLAIM_ID IN (SELECT CCS_CLAIM_ID FROM CCS_LOSS_CLAIM_EVENT_B B)
SELECT * FROM CCS_file_note@EDCMFGP1 A
WHERE CCS_CLAIM_ID IN (SELECT CCS_CLAIM_ID FROM CCS_LOSS_CLAIM_EVENT_B)
Hope this helps you.
|
|
|