Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
![]() |
![]() |
Home -> Community -> Usenet -> c.d.o.misc -> Oracle SQL Tuning
Hi,
I got two data structure identifical tables table_a and table_b. Table table_a contains not more than 100 records while Table table_b contains more than 100000 records. Both tables have the same Primary Key.
Now, I am going to "diff" the records in table_a with the ones in table_b and show the different records in table_a. Someone told me that I could use the following SQL statement to "diff" the records :
SELECT * FROM table_a
MINUS SELECT * FROM table_b
He told me that it was efficient to find the difference of the two identificals. As I have not used this way to compare two sets of records, I went ahead to run the SQL statement. However, I found that the above SQL statement ran a long long time, even though the number
Can the above statement use the Primary Key as indexing?
-- Regards, Patrick LoReceived on Thu Jul 04 2002 - 21:07:59 CDT
![]() |
![]() |