deleting records based on join
Hello,
I'm trying to delete records from a table that is rather large and I'm wondering if anyone has a better way of doing this?
Delete from people a where a.activity_id in (select row_id from activity_row_id)
The activity_row_id table is made up of one column. The problem (I think) will be with the 'in' statment. I can't use an '=' sign because the sub query returns more than one row.
The people table is rather large so anything I could do to speed up the delete would be great.
thanks....
P.S.: I will be taking other steps like dropping indexes and such but I'm just looking for a better sql statment.