Skip to Main Content

SQL & PL/SQL

Announcement

For appeals, questions and feedback about Oracle Forums, please email oracle-forums-moderators_us@oracle.com. Technical questions should be asked in the appropriate category. Thank you!

utl_match in procedure comparing million records

817620Nov 22 2010 — edited Dec 2 2010
Hello guys,

i hope you can help me with my problem...

the problem is:
2 tables - one with 2 million records, and the other with 8000 records.

i need to compare for each record in a table if there's a similar string on the other table.

i've created a procedure that does the following:

opens the first cursor (select col1,col2,col3,col4... from table 1)
loop
opens second cursor (select col1 from table 2)
loop
if utl_match(col1, table2.col1) > 80 then
insert col1,col2,col3,col4... into tableX
end if
close second cursor
close first cursor

the thing is that this procedure takes forever to end...about 8 days.

is it because im using the utl_match function? is there a way to speed this up?

thanks in advance,
Joao
This post has been answered by Madhu BR on Nov 22 2010
Jump to Answer
Comments
Locked Post
New comments cannot be posted to this locked post.
Post Details
Locked on Dec 30 2010
Added on Nov 22 2010
7 comments
1,833 views