One of simple delete query is taking more than 10hrs to execute. There are more than 12 foreign keys dependent on that table. Query is like this,
Delete from Some_Table where table_sr_key !=-99 and sector_id=@some_code
But if we execute the same query after updating the statistics of the table then the query get executed in few minutes.
Please help me how me handle this issue so that those query will execute without any manual intervention.
Thanks in advance,