Drop Table
Support Forum for database administrators and web based access to important newsgroups related to databasesI was told to run the query listed below in the morning on my database and the other query at the end of the day. What detail information will be given from the delete and the select statement? Thanks, Morning: delete from sysindexes where name like '_wa_sys_%' End of Day: select count(*) from sysindexes where name like '_wa_sys_%'
Post Follow-up to this messageWhat was their reasoning? They should learn a little more about how sql server works before suggesting things like that. If you want to remove statistics you should have a look at DROP STATISTICS in BooksOnLine. But why would you want to remove all the stats every day? I can see no reasoning for that. -- Andrew J. Kelly SQL MVP "Joe K." <Joe K.@discussions.microsoft.com> wrote in message news:CCA353B4-4030-4A18-97AA- 8B320136F80F@microso ft.com... > > I was told to run the query listed below in the morning on my database and > the other query at the end of the day. > > What detail information will be given from the delete and the select > statement? > > Thanks, > > Morning: > delete from sysindexes where name like '_wa_sys_%' > > End of Day: > select count(*) from sysindexes where name like '_wa_sys_%' >
Post Follow-up to this messageUgh, this is some bad, bad advice. Why would "he/she" want you to do that?? These are statistics that SQL Server keeps on non-indexed columns. Maybe a better solution would be to look into them with the idea that you may need an index or two added to your data model. Here's a good article that talks about them http://www.windowsitpro.com/Article...38441.html?Ad=1 "Joe K." <Joe K.@discussions.microsoft.com> wrote in message news:CCA353B4-4030-4A18-97AA- 8B320136F80F@microso ft.com... > > I was told to run the query listed below in the morning on my database and > the other query at the end of the day. > > What detail information will be given from the delete and the select > statement? > > Thanks, > > Morning: > delete from sysindexes where name like '_wa_sys_%' > > End of Day: > select count(*) from sysindexes where name like '_wa_sys_%' >
Post Follow-up to this message
Show a Printable Version
Email This Page to Someone!
Receive updates to this thread