摘要: 客户有个需求,导出页面一个月的数据,大概30W的数据需要一次性导出到EXCEL,因为之前做地太急,没有做异步导出。所以因为循环量过大,超时(1分钟超时)报错。 表结构是 一个 父表,一个子表,父表和子表是一对多的关系,还有一些其他的配置表。 优化步骤1:去掉多余的join,只保留父表,子表两个表查出 阅读全文
posted @ 2021-07-14 15:07 ToLoveAsync 阅读(367) 评论(1) 推荐(1) 编辑
摘要: using System.Web.Routing; //重写System.Web.Routing中Initialize方法 protected override void Initialize(RequestContext requestContext) { base.Initialize(requestContext); ... 阅读全文
posted @ 2018-12-07 17:01 ToLoveAsync 阅读(933) 评论(0) 推荐(0) 编辑
摘要: 从周一到周日的顺序,获取排序数值: int i = DateTime.Now.DayOfWeek - DayOfWeek.Monday; if (i == -1) i = 6; 获取某日起,星期一日期: public static DateTime GetMondayDate(DateTime so 阅读全文
posted @ 2018-11-21 01:03 ToLoveAsync 阅读(510) 评论(4) 推荐(0) 编辑
摘要: Stream s = Request.InputStream; int count = 0; byte[] buffer = new byte[1024]; StringBuilder reqXml = new StringBuilder(); while ((count = s.Read(buff 阅读全文
posted @ 2018-11-21 00:48 ToLoveAsync 阅读(1263) 评论(1) 推荐(0) 编辑
摘要: public SortedDictionary<string, string> GetRequestPost() { int i = 0; SortedDictionary<string, string> sArray = new SortedDictionary<string, string>() 阅读全文
posted @ 2018-11-21 00:45 ToLoveAsync 阅读(1335) 评论(1) 推荐(0) 编辑
摘要: FormsAuthentication.SetAuthCookie(UserFlag, createPersistentCookie); createPersistentCookie是否永久保存cookie https://www.cnblogs.com/joeylee/p/3521131.html 阅读全文
posted @ 2018-11-04 23:37 ToLoveAsync 阅读(952) 评论(2) 推荐(1) 编辑