首页 >计算机类 >微软认证 > >You are the administrator of SQL server 2000 computer. The server contains a database named MedicalRecords. Users access medical records by using the PatientID field. This field is the clustered prima

You are the administrator of SQL server 2000 computer. The server contains a database named MedicalRecords. Users access medical records by using the PatientID field. This field is the clustered prima

时间:2019-11-01 05:45浏览次数:

You want to accelerate query response time and minimize administrative overhead. How should you reconfigure the database?

A.Create a SQL Server Agent job to execute the UPDATE STATISTICS statement, and schedule the job to run weekly.

B.Select the Auto Update Statistics check box.

C.Run the database maintenance plan wizard, and accept the default settings.

D.Rebuild the primary key as a nonclustered primary key.

E.Clear the Auto Create Statistics check box.

参考答案

正确答案:B
解析:Explanation:TheAutoUpdateStatisticsoptionisselectedbydefaultbutintheExhibitithasbeendisabled.Apparentlythestatisticsareout-of-dateandthequeriesarerunningslowly.TheAutoUpdateStatisticsoptionshouldbeenabledtoincreaseperformanceandminimizeadministrativeoverhead.Note:SQLServerkeepsstatisticsaboutthedistributionofthekeyvaluesineachindexandusesthesestatisticstodeterminewhichindexwouldbethebestindextouseforaparticularqueryprocess.Asthedatainacolumnchanges,indexandcolumnstatisticscanbecomeout-of-date.Thiscanhinderthequeryoptimizer’sabilitytomakeoptimaldecisionsonhowtoprocessaquery.Asaresultqueryperformancewilldeteriorate.Whenstatisticsbecomeout-of-datetheycanbeupdatedautomaticallyiftheAutoUpdateStatisticscheckboxonthetablepropertydialogboxischecked.IncorrectAnswers:A:Itwouldrequiresomeadministrativeefforttosetupjobthatupdatethestatistics.JustselectingtheAutoUpdateStatisticscheckisabettersolution.C:TheDatabaseMaintenancePlanWizardcannotbeusedtorecreatethestatistics,whicharethemainproblematthemoment.Note:TheDatabaseMaintenancePlanWizardcanbeusedtosetupthecoremaintenancetasksnecessarytoensurethatadatabaseperformswell,isregularlybackedup,andischeckedforinconsistencies.TheDatabaseMaintenancePlanWizardcreatesaSQLServer2000jobthatperformsthesemaintenancetasksautomaticallyatscheduledintervalsandcanbeusedtoreorganizethedataonthedataandindexpagesbyrebuildingindexeswithanewfillfactor;compressdatafilesbyremovingemptydatabasepages;updateindexstatisticstoensurethequeryoptimizerhasup-todateinformationaboutthedistributionofdatavaluesinthetables;perform.internalconsistencychecksofthedataanddatapageswithinthedatabasetoensurethatasystemorsoftwareproblemhasnotdamageddata;backupthedatabaseandtransactionlogfiles;andtosetuplogshipping.D:Lookingattheexhibitweseethatthisisastatisticsproblem,notaindexproblem.Note:Anonclusteredindexissimilartoanindexinatextbook.Withthistypeofindex,thedataisstoredinoneplaceandtheindexinanother.Theseindexes,however,pointtothestoragelocationofthedata.Nonclusteredindexesshouldbeusedoncolumnsthatcontainalargenumberofdistinctvalues;forqueriesthatdonotreturnlargeresultsets;andforcolumnsthatarefrequentlyinvolvedinsearchconditionsofaquerythatreturnexactmatches.Aclusteredindex,ontheotherhand,determinesthephysicalorderofdatainatable.ThePRIMARYKEYindexautomaticallycreatesaclusteredindexasitisusedtoidentifyarowunlessanonclusteredindexisspecified.E:WhensettheAutoCreateStatisticscheckboxischecked,statisticsareautomaticallycreatedoncolumnsthatareusedinapredicate.AddingstatisticsimprovesqueryperformancebecausetheSQLServerqueryoptimizercanbetterdeterminehowtoevaluateaquery.Ifthestatisticsarenotused,SQLServerautomaticallydeletesthem.Whenthischeckboxiscleared,statisticsarenotautomaticallycreated.

    阅读排行