10 seconds is far too long for a database lookup on 100 records. It also sounds like too long to send a modest number of emails. Have you tried running the script off line to check that it really takes as long as you are reporting?
If the script does take as long as reported you should put together a sample script (see I know what I mean. Why don't you? for some hints) and we'll help speed it up for you.
If it turns out that the processing time is unavoidable you can always fork off a task to send the emails and complete the http transaction without waiting. See replies to Managing a long running server side process using CGI for ways to do that.
In reply to Re: Looping through database query to send emails is taking too long
by GrandFather
in thread Looping through database query to send emails is taking too long
by htmanning
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |