Sign up ×
Database Administrators Stack Exchange is a question and answer site for database professionals who wish to improve their database skills and learn from others in the community. It's 100% free, no registration required.

Due to limitations put on me I've got to put my outgoing Email Queue in the same database as my customer information.

What are some optimizations I can make, specifically to the Email portion that will make this process smoother:

  • Grab emails where "sending" is set to False
  • Set "sending" on all those records to True
  • Process them one at a time, if they fail mark "sending" to False on the record
  • If they succeed, delete the record and add a new one to "Email Archive" table

This process will run once every 5 minutes. At the moment there will only be one app sending the emails but in the future there may be more.

share|improve this question
Why do new development on SQL 2000? Put some pressure on leadership to get up to date. – brian Aug 19 '12 at 18:41
@brian : It's not an option and has already been discussed with leadership. – James P. Wright Aug 20 '12 at 13:46
If you're absolutely stuck with 2000, have you looked into using SQL Mail instead of reinventing the wheel? (I can't believe I just suggested that -- make sure your code is easily modifiable to work with Database Mail if and when you upgrade.) – Jon Seigel Aug 20 '12 at 15:55

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Browse other questions tagged or ask your own question.