如何缩短处理时间? [英] How to reduce the time for processing faster ?

查看:116
本文介绍了如何缩短处理时间?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

Hii团队,



我在foreach循环中发送电子邮件和同一个循环我正在执行其他sp以更新ids floag为true它发送..它的大量时间发送电子邮件然后更换标志

Hii Team ,

I am sending emails in foreach loop and the the same loop i am executing other sp for updating that ids floag to true that it is sent .. its takng so much time to send an emails and then udating that flag

推荐答案

使用线程代替每个循环。每个线程都会发送邮件和更新标志。
Use thread instead of for each loop. Every thread will send mail and update flag.


参考



处理电子邮件异步发送 [ ^ ]


好吧,很有可能会说你应该对电子邮件的发送进行处理并将更新合并到那里,但这可能不是解决方案。这真的取决于你的架构。您是否可以从数据库服务器运行发送邮件? SQL Server可以轻松地发送邮件,您可以采用基本方法发送电子邮件。
Well, it's tempting to say that you should thread the send of the emails and incorporate the update in there, but that may not be the solution. It really depends on your architecture. Is it possible that you could run the send mail from the database server? SQL Server easily allows you to send mail and you could adopt a set base approach to sending out your email.


这篇关于如何缩短处理时间?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆