I'm looking for a best practice / thoughts on if it is better to do a select count and checking if the result is > 0 before calling a delete or if it would be better to just blindly fire a delete statement at the database even if the data doesn't exist. In our case most of the time data will NOT exist.
So what is better:
Option 1: call Select Count(X) where foo, if result > 0, delete where foo
or
Option 2: delete where foo
I lean towards the blind delete for speed reasons and since you are doing a table hit anyways.
EDIT: This is actually happening in kettle(an ETL tool) so the three operations will be done completely separate if there is a delete. So completely in SQL is not an option.