Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
Home -> Community -> Usenet -> c.d.o.server -> Database-Link.
Hello,
I have a problem with select-statements and joins. I have two Oracle databases with a databaselink between them. In the first database I have a table that is very small, five records. In the other database I have a table that is larger, 120,000 records. When I trying to make a select statement that joins these tables it's seems like oracle makes a full table scan for all five records. If I join two tables on the same database it's no problem. I have indexes on both columns that I join. The select-statement looks like this:
SELECT A.NO, B.DESCRIPTION FROM TEST1 A, TEST2 B WHERE A.NO = B.NO; TEST2 is a synonym for TEST2_at_databaselink. I have also tried without the synonym with the same result. TEST2 is the "large" table.
Is there a way to make a better select statement ? or is it the database link that make this impossible ?
Regards
Claes Received on Wed Jan 08 1997 - 00:00:00 CST