|
-
Basically you have a wrong application design.
Instead of deleting rows ( 1/2 M !!!) daily, have a DELETED_FLAG column in the table. Update this column with value "Y" when ever you want to delete a A/C number. Include this column in all other SQL statements where clause.
When there is a low usage level ( Saturday night ), physically delete the rows from the table.
For your question I would prefer JOIN over SUBQUERY.
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|