???? ID: 195565 - ????? ???????: 02 ?????? 2010 - ??????: 4.0 ??? SQL Server statistical ?????? ??????????? (autostats)
?? ????? ??????????-???????? statistical ?????? ???????????, AutoStat, ??????? ?????? ?? ??????? overhead ????? ???????? ??? ?? ??? ?? ????? ???? ?? ????? ?? ???? ??:
??? SQL Server 2000 autostats ?? ???? ??? ??????? ?? ??? ????? "?????? Used ?? ?????? ??????????? Microsoft SQL Server 2000 ???" ????? MSDN ??? ???? ??: (SQL.80) http://msdn2.Microsoft.com/en-us/library/aa902688 .aspx
(http://msdn2.microsoft.com/en-us/library/aa902688(SQL.80).aspx)
???:??? ?? Microsoft SQL Server 2005 ?? ????? ?? ??? ???, ?? ???? ????? ?????? ????? ?? ?? SQL Server 2005 ??? ?????? ??????????? ?? ???? ??? ??????? ?? ??? ????? Microsoft ????? ???? ?????: HTTP://TechNet.Microsoft.com/en-us/library/cc966419.aspx
(http://technet.microsoft.com/en-us/library/cc966419.aspx)
???? ?????????????? ???????SQL ????? ?? ??? ????-?????? ??????????? ???????? ?? ??????????? ?? ?????? ???? ?? statistical ??????? ?? ??? ???????? ????????? ?? ???? ??? ?? makes ?? ????? ????? ??? ?? ?? ?????? statistical ???????, ???? SQL ????? ???? ????? ?????? ?? ??? ????? ???????? ????? ?? ??? ????? ?? ??? challenged ?? ?? ???? ?????????? ??????????? ?? ????-?????? ?????? ?? ????? ???? ??? ?????? ?? ??? SQL ????? ??? ???????? ?????? ?? ???? ??:
???? ?? ??? ??? ?? ?????? ?? ??? ??? ??????? ??? statistical ??????? ????, ?? ??? SQL Server introduces AutoStat, ??, ?????? ?? ??????, ?? ??????? SQL ????? ?? ?????? ?? ?? ??? ???????? ????????? ?????? ?? ?? ?? ?? ???? ?????? ?? ??? ?????? ????: ?????? ???? ??? ?????? ??? ??, SQL Server introduces ????:-?????-?????, ?? ???? ??????? ?????? ?? ???? ??????? ?? ??? ?????? ??? ????????? ?? ????: ????? ???? ?? ??? ????? ?? ???? ???? ??? ?? AutoStat ????? imminent ?? ??????????? ????? ??? ??, ?? ??? ??? AutoStat ????? ????: ?????? ???? ????? ?????? ?? ??? ?????? ?? ??? "???????? ?????????" ?? ????? ???? ??? Sysindexes.rowmodctr ????? ??? ?? ???? ???? ???? ??, ??, ??? ?? ??? ?? ???? ??? adversely ???????? ?????? ???????? ?? ?????? making ????????? ???? ?????? ?? ??? ?????? ?? ???? ?? ?????? ??? ????? ????? ?? ??? ?? ???? ?? ?? ?? ??? ?????? ??:
?????? ?? ????? ?????? ??? ?? ???, ?? ??? rowmodctr ??? 0 ?? ??? ????? ???? ?? ?? ?????? ?????? ??????? ????? ?????? ????? ???, ????????? ??? ?? ???? ???????? ????????? ?? ???????? ????? ??? ?? ???? ??? ?? ?? ?? ????? ?? ????? ????????? ??, ??? ????? ?????? ??????? ????? ?? ????? ?? ??????? ??????? ?? ???? ??? ?? ?????? ?????? ???, ???????? ????????? ?? ??? ????? recompiled ?? ?????? ????: ?????? ??????? ?? ??? ??? ?????????? ??:
???:: ???? ?? ???????? cardinality, selectivity predicate ?? ?? ???????? AutoStats ?????? ???? ???? ?? ??? ?? ????? ???? ?? ???? ?? ?????? afer ???????? 500 ?????? ??? cardinality ?? < 500="" or="" for="" every="" 20%="" of="" changes="" if="" cardinality="" were=""> 500? ????? ??????? (??? ?????? 1 ?? 4, 1 ?? 4, ???????? ???? ?? ???) ?? selectivity ?? ???? ?? ????? ???? ??? ?? ?? ???? ?????? ?? ?? ??????? ?? ?????????? ?? ??????? ???? ?? ??? ??? ???????? ?? ?????? ?? ???? ???? ?? ???? AutoStats ??????? ???? ?? ??? ?????? ?????? ?? ???????? ?????? ??? ??? ?????????? ???? ?????? ?? ??? ??? summarised ?? ???? ???: _________________________________________________________________________________ Table Type | Empty Condition | Threshold When Empty |Threshold When Not Empty _________________________________________________________________________________ Permanent | < 500 rows | # of Changes >= 500 | # of Changes >= 500 + (20% of Cardinality) ___________________________________________________________________________ Temporary | < 6 rows | # of Changes >= 6 | # of Changes >= 500 + (20% of Cardinality) ___________________________________________________________________________ Table Variables | Change in cardinality does not affect AutoStats generation. ___________________________________________________________________________ ?????? 1Pubs ???????, ?? 23 ????????? ??? ??? ?? ?? ????????????? ??? ??? ?????? ?? ???? ?? ????? ????? ????? ????? ???????????, UPKCL_auidind, ?? ?????, au_id, ?? ?????????? ?? ?? ?? ????????? nonclustered ???????????, aunmind, au_lname ?? au_fname ????? ?? ????? ??? ??? ?? ?????? ??? ?? ?? 500 ????????? ???, ??????? AutoStat 500 ?????? ???? ???????? ? ?? ??? ?? ??? ??????? ????? ???????? 500 ?? ?? ???? ??? ?? ???? ???????? ???? ??, ????? ??, ???? au_lname, ?? ???? ?? ?????? thereof ??? ?????????? ????? ?? ????? ????? ?? sysindexes.rowmodctr ???, ???????? ?????? ?? incremented ???? ?? ?????? ?? ????? ?????? ??????? ?? ?????, ????? predict ?? ???? ???? ?? ?? ?? ????? ???? ?? ?? 500 ?? ???? ?? ??? ??, ?? ?? ?? ??????? ???? ?? ??? ?????? ????? ??????? ?? ???? ???? ?????? 2????? ??????, t2, ?????? ?? cardinality 1,000 ?? ???? ?? ????? ????? 500 ????????? ?? ???? ?? ??? ???????? ?? ??? ?????? ????? ????? SQL Server ?? (500 + 20 ???????) ???????? ??? ?? ???? ??? ?? ?? ??? ??, 1,000 ?? 20 ??????? ?? 200, ????? AutoStat ?????? ?? ??? ???? 700 ?????? ??? ?? ??? ?? ??? ??????? ???? ?? ????? ?? ??? ??????? ?? ???? ????Autostats determination ????????? AutoStat ???? ????? ?? determination ?? ???????? ???? ?? ??? ?? ???? ?? ?? ?? sysindexes ?????? poll ???? ?? ?? ????? ???? ?? ?????? ?????? reaching ??????? ????? ???? ??? ???? ?? ??? ??? ??? ?????????? ????? ??:?? ??? ??? ????? ??? ?? ??? ????? ??????? ???:
???????? ?? ?? ???? ?????? ????? ???? ?????? ?? ??????? ????? ????????? ?? ??, ?? ??? ???? obvious ?????? ?? AutoStat proven Problematic, ???? ??? ?? ????: ?????????? ?????, ???? intrusive ?? ??? ?? ????? ?????? ????? ?? ??????? ???? ?? ??? ????? ??????? ?????????? ?? ???? ?????? ?? ????? ???? ?? ???? ?? ?? ???? ??? ??? ?????? ????? ??? ?? sp_autostats ???????? ????????? ?? ????? ?? ?? ??? ?????? ????? ??? ?? ??? ???????? ??:Sp_autostats ???????? ????????? ?? ??? ???????? ??: sp_autostats <table_name>, <stats_flag>, <index_name>
</index_name></stats_flag></table_name> ???? <stats_flag>?? ?? "??" ?? "???" ??.</stats_flag>?? ?????? ????? ?? ??????-??????? ?? ???? ???? ?? ????? ?? ????: ??????? ?? ????? ???? ?? ??? sp_dboption ?? ????? ?? ???? ???: sp_dboption <dbname>, '????: ?????? ?????', <on |="" off="">
</on></dbname> -??- sp_dboption <dbname>, '????: ??? ?????', <on |="" off=""> </on></dbname> ???????? ?????? ????? ??????????? ?? ?????? ?? ??????????????? ???, ????? ???????? ?? ??? AutoStat ?? ????? ???? ?? short ???? ???? ?? ?? concurrently ????? ?? ??? ?? ???????? ?????? ????? ??? ?? ?????? ?? ???????? ???? ?? ??? (DCR 51539 ?? ??? filed ?? ??? ??)? ????? ?? ??? ??? ???????? ?? ????? ?????? ????? ???????? ??????????? ?? ?????? ?? ?????, ???????????????? ???? ?? Autostats ????? ?? ??? ???? ?? ??????-?????? ???????? ????????? ?? ??? ??? ??? ?????? ?? AutoStat recompiled ???? ?? ??? ??, ?? ??????? ???? ?? ??? ???? ????? 205 ?? ????? ?? ????? ?? ????? ???? ?????? ??? ???? ?? ??? ????? ????? ???? ?????:1998-10-15 11:10:51.98 spid9 Recompile ????: ProcName: sp_helpindex LineNo: 75 StmtNo: 29 1998-10-15 11:38:43.68 spid8 ?????? ?????: Tbl Dbid: ??? Objid: 133575514 RowModCnt: 60500 RowModLimit: 60499 ?? ?? ???? ?? ????? ???? 8721, ?? ?????? ??? ??? ??????? ???? ????? ?? AutoStat ????? ??? ?? ?? ????? ???? ?? ???? ????? ????? ?? ??? ??????? ?? ???? ??? ?? ?? ?????? ?? ?? ?????? ?????????? ??: 1998-10-14 16:22:13.21 spid13 AUTOSTATS: Tbl ??????: [??????] ?????????: 23 Mods: 501 ?????: 500 ????: 47ms UpdCount: 2 ?? ?? ?????? ????? ????? ????? ?? ??? ????? ???? ?? ??? SQL Server Profiler ?? ????? ?? ????? ??? ???? ?? ???, ????? ????? ?? ????:
?????? locksSQL ????? employs ?????? locks, ?? ??? ???? ?????? ?? ??? ?????? ?????? ?? ??? ?????? ?? ????? ??? ?? ?? ?????? ??:Sch-S: Schema Stability Lock ---------------------------- This lock ensures that a schema element, such as a table or index, will not be dropped while any session holds a schema stability lock on the schema element. Sch-M-UPD-STATS: Schema Modification Lock ----------------------------------------- This is a non-blocking lock that is used by the system to ensure that only one automatic UPDATE STATISTICS process is run against a table at any given point in time. The sp_lock stored procedure will report this lock has having a type = TAB, resouce = UPD-STATS and mode = SCH-M. ???? ???? ???? ??:
???? ?????? ??????????????????: ?? ???? ?? ???? ??????? ?? ????? ?? Microsoft ????-?????? ?????????? ?????? ?????? ???? ??? ??. Microsoft ???? ??? ????-???????? ?? ????-???????? ????? ?????? ?? ???? ???????? ???? ?? ???? ????? ????? ??? ?? ??? ?????? ?? ???? ???? ???? ??? ????? ??. ???????, ????-???????? ???? ????? ???? ???? ???? ???. ?????, ????????, ?????-???? ?? ??????? ?? ???????? ?? ???? ???, ???? ?? ??? ?????? ???? ???? ??? ????? ??? ?? ???? ??. Microsoft ??????? ??? ???? ?? ?????? ?? ??????????, ????????? ?? ??? ?????? ?? ???? ????? ?? ???? ???????? ?? ??? ???? ????? ?? ??? ????????? ???? ??. Microsoft ????-?????? ?????????? ?? ????? ?????? ?? ?? ??? ??. ?????????? ?? ??????? ????????? ??????? ??:195565
(http://support.microsoft.com/kb/195565/en-us/
)
| ???? ?????? ???? ?????? ??????
????????? ?????? ??????? ???????? ??????
|






Windows Live
Facebook
Twitter
Linkedin
Digg it
Yahoo
Delicious
StumbleUpon
Yammer
Reddit
Technorati
FriendFeed
Email

????? ?? ???? ????
