Featured post

c# - Usage of Server Side Controls in MVC Frame work -

i using asp.net 4.0 , mvc 2.0 web application. project requiremrnt have use server side control in application not possibl in noraml case. ideally want use adrotator control , datalist control. i saw few samples , references in codepleax mvc controllib howwver found less useful. can tell how utilize theese controls in asp.net application along mvc. note: please provide functionalities related adrotator , datalist controls not equivalent functionalities thanks in advace. mvc pages not use normal .net solution makes use of normal .net components impossible. a normal .net page use event driven solution call different methods service side mvc use actions , view completly different way handle things. also, mvc not use viewstate normal .net controlls require. found article discussing mixing of normal .net , mvc.

Why do statistics get out of date so quickly in SQL Server? -


we have complex sql update query gets run few times month. of time seems run fast, on databases, takes long time. after running "update statistics" on tables involved, update runs again. set nightly task calls update statistics on tables in database. didn't seem fix problem. we're still ending having run "update statistics" manually each time. why statistics go stale quickly?

here's approximately query looks like:

update datatablea set datatablea.indexedcolumn1 = 123456789, datatablea.flag1 = 1 datatablea (index(ix_datatablea)) inner join groupingtablea on groupingtablea.foreignkey1 = groupingtablea.primarykey inner join lookuptablea on datatablea.foreignkey3 = lookuptablea.primarykey left outer join groupingtableb on datatablea.indexedcolumn2 = groupingtableb.indexedcolumn2 groupingtableb.indexedcolumn1 = 123456789 , datatablea.indexedcolumn1 null , datatablea.indexedcolumn2 in ( ... 300 entries here ... ) , datatablea.deleted = 0 , groupingtablea.date <= groupingtableb.enddate , groupingtablea.date >= dateadd(month, -1, groupingtableb.startdate) , lookuptablea.column2 = 1 , datatablea.status1 in (1, 3) , datatablea.status2 not in (1, 3, 9) 

datatablea contains millions of rows.
groupingtablea , groupingtableb each contain tens of thousands of rows.
lookuptablea contains dozens of rows.
index ix_datatablea index on (indexedcolumn1 asc, indexedcolumn2 asc)

i don't think statistics matter if forcing use specific index (with (index(ix_datatablea))

are sure know better optimizer?

i start looking @ execution plan fast update , slow update. also, number of records being updated comparable fast/slow queries?


Comments

Popular posts from this blog

c# - Usage of Server Side Controls in MVC Frame work -

cocoa - Nesting arrays into NSDictionary object (Objective-C) -

ios - Very simple iPhone App crashes on UILabel settext -