May 25, 2011 at 12:06 pm
With the indexs created and the update statistics the query is now very fast..
May 25, 2011 at 12:10 pm
river1 (5/25/2011)
With the indexs created and the update statistics the query is now very fast..
Has it been 24-48 hours already since you created the index?
If you created the index on the out of date stats column you "may" have fixed the issue by accident if you also do daily reindex.
May 25, 2011 at 12:16 pm
sorry did,t undestood your question.
What i did was:
I created some new indexs on some tables includind the liquidacao table.
This are new indexs created on tables.
I have tried create the indexes and don't update statistics and it works fine, then i tried to create the indexes and they create the statistics, it wotks fine too.
i don't know what to think ... Was this because of lack of indexes or because of lack of update statitics?
What do you think?
May 25, 2011 at 3:01 pm
river1 (5/25/2011)
sorry did,t undestood your question.What i did was:
I created some new indexs on some tables includind the liquidacao table.
This are new indexs created on tables.
I have tried create the indexes and don't update statistics and it works fine, then i tried to create the indexes and they create the statistics, it wotks fine too.
i don't know what to think ... Was this because of lack of indexes or because of lack of update statitics?
What do you think?
WHEN did you do this?
It takes at least 1 business day untill the stats get out of sync again. So if you did all this today it will work TODAY, but will likely start to fail again tomorrow.
May 25, 2011 at 3:08 pm
I did it to a database that is not on production.
In this case what do you think?
It's better to update statistics every day manualy on the production database or create indexes on the production database.
My question is, this problem is related to the statistics or to the lack of indexes?
I was thinking in don't create this indexes and create a job that every day updates the statistics.
What do you think?
May 25, 2011 at 3:22 pm
river1 (5/25/2011)
I did it to a database that is not on production.In this case what do you think?
So you don't know if the problem is solved. You'll know ONLY after you deployed your changes to prod and waited for 4-5 business days.
river1 (5/25/2011)
It's better to update statistics every day manualy on the production database or create indexes on the production database.
It's completely different. The index will also create a stat but if you don't need the index you actually make things worse.
river1 (5/25/2011)
My question is, this problem is related to the statistics or to the lack of indexes??
STATS
Since you say update stats SOLVES the issue this is what I'd do first. If you can also prove that the extra indexe(s) you build improve performance I'd also add those.
river1 (5/25/2011)
I was thinking in don't create this indexes and create a job that every day updates the statistics.
What do you think?
STATS. Even if the new index somehow helps, the STATS will be out of date as soon as the new business day starts and some time later, maybe seconds, maybe hours, the performance will go back to slow as hell.
Reread the article Gail posted, everything is clearly stated and proven in that blog post.
May 25, 2011 at 3:25 pm
Leave it Ninja. When it breaks in a week's time because the update stats job wasn't added we'll be back here anyway.
Gail Shaw
Microsoft Certified Master: SQL Server, MVP, M.Sc (Comp Sci)
SQL In The Wild: Discussions on DB performance with occasional diversions into recoverability
May 25, 2011 at 3:29 pm
It's decided! i am going to create the job that updates the stats to work every day.
Thank you very much gail and ninja for the great help.
May 25, 2011 at 3:32 pm
**wrong quote bug***
I'm a hopeless romantic... but this was my last try unless he comes up with an intelligent question we haven't covered so far here or in your excellent blog post.
Looks like it worked! :hehe:
May 25, 2011 at 3:36 pm
Ninja i am sorry but my english is not very good.
What did you mean with your last post?
did you mean that i am doind right if i create the job that update statistics?
May 25, 2011 at 3:38 pm
river1 (5/25/2011)
Ninja i am sorry but my english is not very good.What did you mean with your last post?
did you mean that i am doind right if i create the job that update statistics?
Yes. I just said that I quoted the wrong post and that I'm happy you understood.
May 25, 2011 at 3:40 pm
thank you very much once more
Viewing 12 posts - 31 through 42 (of 42 total)
You must be logged in to reply to this topic. Login to reply