【CUUG内部资料】OCP最新考试题库-1Z0-062(1)序:OCP认证是Oracle的一个中级认证,对于升职加薪跳槽都有很大的帮助,但是想考OCP证书其实有一定的难度,比如考试题的内容全部都是英文题、考题的内容会有稍微修改、考题的答案顺序并不固定、不定时的出现新考题等。。。这些都增加了考试的难度,所以我们收集了一些考试题并进行了讲解,这部分内容是关于12c-062的考试解析,希望对广大考生有帮助。QUESTION46Whichthreefeaturesworktogether,toallowaSQLstatementtohavedifferentcursorsforthesamestatementbasedondifferentselectivityranges?A.BindVariablePeekingB.SQLPlanBaselinesC.AdaptiveCursorSharingD.BindvariableusedinaSQLstatementE.LiteralsinaSQLstatementCorrectAnswer:ACESection:(none)ExplanationExplanation/Reference:(如果优化器能知道文本变量的值,更容易产生更加优秀的执行计划,这意味着使用文本变量更容易产生好的执行计划,而非绑定变量。当你执行一个SQL的时,如果你使用了绑定变量,这将意味着变量的值对优化器是未知的,优化器只能把它当做一个普通值处理。产生的执行计划就可能不够符合值的特征。使用了字符常量后,优化器知道如何根据直方图信息生成优秀的执行计划,那么使用绑定变量会变成什么样呢?这个依赖于ORACLE的版本。在ORACLE9i/10g版本,ORACLE会在第一次硬解析的时候,窥探绑定变量的值,然后生成执行计划,后面的SQL都会使用这个执行计划来执行。(引发了很多问题)在ORACLE11g版本,ORACLE有一个adaptivecursorsharing的特性,根据不同的绑定值可能产生不同的执行计划,可以解决9i/10g的问题。)QUESTION47YounoticeaperformancechangeinyourproductionOracle12cdatabase.Youwanttoknowwhichchangecausedthisperformancedifference.Whichmethodorfeatureshouldyouuse?A.ComparePeriodADDMreportB.AWRComparePeriodreportC.ActiveSessionHistory(ASH)reportD.TakinganewsnapshotandcomparingitwithapreservedsnapshotCorrectAnswer:B(解析:比较数据库不同时间段的性能差异,最好的方法就是比较AWR报告)QUESTION48YouwanttocapturecolumngroupusageandgatherextendedstatisticsforbettercardinalityestimatesfortheCUSTOMERStableintheSHschema.Examinethefollowingsteps:1.IssuetheSELECTDBMS_STATS.CREATE_EXTENDED_STATS(`SH',`CUSTOMERS')FROMdualstatement.2.ExecutetheDBMS_STATS.SEED_COL_USAGE(null,`SH',500)procedure.3.ExecutetherequiredqueriesontheCUSTOMERStable.4.IssuetheSELECTDBMS_STATS.REPORT_COL_USAGE(`SH',`CUSTOMERS')FROMdualstatement.Identifythecorrectsequenceofsteps.A.3,2,1,4B.2,3,4,1C.4,1,3,2D.3,2,4,1CorrectAnswer:BSection:(none)ExplanationExplanation/Reference:Step1(2).SeedcolumnusageOraclemustobservearepresentativeworkload,inordertodeterminetheappropriatecolumngroups.UsingthenewprocedureDBMS_STATS.SEED_COL_USAGE,youtellOraclehowlongitshouldobservetheworkload.Step2:(3)Youdon'tneedtoexecuteallofthequeriesinyourworkduringthiswindow.Youcansimplyrunexplainplanforsomeofyourlongerrunningqueriestoensurecolumngroupinformationisrecordedforthesequeries.Step3.(1)CreatethecolumngroupsAtthispointyoucangetOracletoautomaticallycreatethecolumngroupsforeachofthetablesbasedontheusageinformationcapturedduringthemonitoringwindow.YousimplyhavetocalltheDBMS_STATS.CREATE_EXTENDED_STATSfunctionforeachtable.Thisfunctionrequiresjusttwoarguments,theschemanameandthetablename.Fromthenon,statisticswillbemaintainedforeachcolumngroupwheneverstatisticsaregatheredonthetable.QUESTION49WhichthreestatementsaretrueaboutAutomaticWorkloadRepository(AWR)?A.AllAWRtablesbelongtotheSYSTEMschema.B.TheAWRdataisstoredinmemoryandinthedatabase.C.ThesnapshotscollectedbyAWRareusedbytheself-tuningcomponentsinthedatabaseD.AWRcomputestimem...