I am working on a project for Oracle v8.0.3 on Windows NT. One of
functions has to update a very large table witch has ten million rows
every half hour with about ten thousand rows which are stored in a
temporary table.
I tried update it row by row. The performance is very slow.
I also tried to use a SQL statement to update it. It always uses full
table scan on the big table instead of using index even though I
created primary key on it. The SQL statement looks like:
UPDATE bigtable BT
SET ( col1, col2, col3 )
=
(
SELECT col1, col2, col3
FROM smalltmp tmp
WHERE BT.key1 = TMP.key1
AND BT.key2 = TMP.key2
)
It took very very long time to be done because it used two full table
scan even they have indexes on the keys.
Can anybody help me to figure out how to avoid full table scan on the
big table and speed up the performance?
Thanks
Jianrong M