Re: Autostatistic ON/OFF on separate tables?
- From: "GG" <gg@xxxxxxxxxxxxx>
- Date: Fri, 3 Jul 2009 08:37:07 +0200
Thank's for your tips Erland, I will look over this alternetiv
Regards
GG
"Erland Sommarskog" <esquel@xxxxxxxxxxxxx> wrote in message news:Xns9C3D21BB3CF8Yazorman@xxxxxxxxxxxx
GG (gg@xxxxxxxxxxxxx) writes:What I'm thinking of is that we have an database 300Gb and two of these
tables has about 60 milj records each.
To day the Autostat is turned off and a job is executing every night but
these two tables takes extremly long time.
Does in run UPDATE STATISTICS WITH FULLSCAN? If you change it to
UPDATE STATISTICS WITH FULLSCAN, INDEX things go faster. Then again,
if you rebuild indexes, there is no reason to update index statistics
as well.
So my thought is that turn on autostat for all except the two biggest and
only do update stat with the night job
That is achievable, but whether it is the right action, I am less sure.
Autostats sets in on a table when 500 rows have been added, and then when
20% of the rows have been modified. (This is a somewhat loose description.)
This means that autostats do not set in very often on these tables.
In the system I work with, I've contemplating turning off autostats on
tables with a fairly low number of rows, but where rows get added and
deleted all the time, causing autostats to set in often with little
use, but causing recompiles.
--
Erland Sommarskog, SQL Server MVP, esquel@xxxxxxxxxxxxx
Links for SQL Server Books Online:
SQL 2008: http://msdn.microsoft.com/en-us/sqlserver/cc514207.aspx
SQL 2005: http://msdn.microsoft.com/en-us/sqlserver/bb895970.aspx
SQL 2000: http://www.microsoft.com/sql/prodinfo/previousversions/books.mspx
.
- References:
- Autostatistic ON/OFF on separate tables?
- From: GG
- Re: Autostatistic ON/OFF on separate tables?
- From: Tibor Karaszi
- Re: Autostatistic ON/OFF on separate tables?
- From: GG
- Re: Autostatistic ON/OFF on separate tables?
- From: Erland Sommarskog
- Autostatistic ON/OFF on separate tables?
- Prev by Date: RE: Indentation of code in SQL server 2005
- Next by Date: ID large queries while they execute and kill
- Previous by thread: Re: Autostatistic ON/OFF on separate tables?
- Next by thread: Re: Autostatistic ON/OFF on separate tables?
- Index(es):
Relevant Pages
|