This article is a mirror article of machine translation, please click here to jump to the original article.

View: 16813|Reply: 3

[New Issue] asp.net reading MSSQL is slow

[Copy link]
Posted on 1/15/2019 4:55:29 AM | | |
Not all SPs are like this, it takes about 130 seconds for some SPs to call MSSQL in the program, but the execution time of these SPs in SSMS is only 3 seconds
I don't know why




Previous:The background music of the splendid whirlwind
Next:The internal football league is very intense
Posted on 1/15/2019 9:05:05 AM |
Send the sql script and take a look.
Also, do you asp.net website and MySQL database on the same machine? Or is it accessed through the external network, is there a bottleneck in the speed of reading data?
Posted on 1/15/2019 10:02:00 AM |
 Landlord| Posted on 1/22/2019 3:49:33 PM |
This post was last edited by kyo0010 on 2019-1-22 15:51

select  sum(a2. All_OrderPrice) sum_AllOrderP
,sum(a2. OrderPrice) Total
,round((case when sum(a2. All_OrderPrice)=0 then 0 else sum(a2. OrderPrice)/sum(a2. All_OrderPrice) end)*100,2,0) avg
,count(a2. MemberID) Regis
,count(case when a2. All_OrderPrice >0 then a2. MemberID else null end) All_Order
,count(case when a2. OrderPrice >0 then a2. MemberID else null end) RPeople         
,round((case when count(a2. MemberID)=0 then 0 else cast(count(case when a2. OrderPrice >0 then a2. MemberID else null end) as float)/count(a2. MemberID) end)*100,2,0) ReservePercent                 
from Game_Analysis.dbo.FN_S_GetContri( @BeginDate,@EndDate,@MemberID,@MemberAccount,@NickName,@ByReg,@OrderID,@RowNum) a2

asp.net website and MSSQL database are directly read on different machines through the intranet

Disclaimer:
All software, programming materials or articles published by Code Farmer Network are only for learning and research purposes; The above content shall not be used for commercial or illegal purposes, otherwise, users shall bear all consequences. The information on this site comes from the Internet, and copyright disputes have nothing to do with this site. You must completely delete the above content from your computer within 24 hours of downloading. If you like the program, please support genuine software, purchase registration, and get better genuine services. If there is any infringement, please contact us by email.

Mail To:help@itsvse.com