<p>Hi all,</p><p> Have these queries written in .net application and it is taking 15 minutes and 9 minutes to get results. So how should I write this to get results faster?</p><p></p><p><span style="font-family:'Courier New';color:blue;font-size:10pt;">SELECT</span><span style="font-family:'Courier New';font-size:10pt;"> <span style="color:fuchsia;">COUNT</span><span style="color:gray;">(</span>StatusID<span style="color:gray;">)</span> <span style="color:blue;">AS</span> TotalCount <span style="color:blue;">FROM</span> view_Prod <span style="color:blue;">WHERE</span> SDate <span style="color:gray;">BETWEEN</span> <span style="color:red;">'01-Jan-13'</span> <span style="color:gray;">AND</span> <span style="color:red;">'07-26-2013'</span> <span style="color:gray;">AND</span> StateId <span style="color:gray;">IN</span><span style="color:blue;"> </span></span><span style="font-family:'Courier New';font-size:10pt;"><span style="color:gray;">(</span>9<span style="color:gray;">)</span> </span></p><p><span style="font-family:'Courier New';font-size:10pt;"></span></p>
Gaby
No comments:
Post a Comment