Inherited another database and trying to fix a timeout issue.
I found where it is occurring but am unsure how to fix it.
UPDATE myTable SET Active = 1
WHERE myField IN (SELECT ID FROM anotherTable)
This is the very short version.
The SELECT ID FROM anotherTable brings back about 2500 records and each record looks like this: 625285092988
The myTable count can be over 1000 records.
I am unsure how to address this as this procedure can take a few hours to run and that's just wrong.
Any and all suggestions are welcomed.