关闭

关闭

关闭

封号提示

内容

首页 高性能MySQL英文原版1

高性能MySQL英文原版1.pdf

高性能MySQL英文原版1

yele
2011-05-18 0人阅读 0 0 0 暂无简介 举报

简介:本文档为《高性能MySQL英文原版1pdf》,可适用于IT/计算机领域

http:downzzbaikecomebook。http:downzzbaikecomebook。HighPerformanceMySQLhttp:downzzbaikecomebook。OtherMicrosoftNETresourcesfromO’ReillyRelatedtitlesManagingandUsingMySQLMySQLCookbook™MySQLPocketReferenceMySQLReferenceManualLearningPHPPHPEssentialsPHPCookbook™PracticalPostgreSQLProgrammingPHPSQLTuningWebDatabaseApplicationswithPHPandMySQLNETBooksResourceCenterdotnetoreillycomisacompletecatalogofO’Reilly’sbooksonNETandrelatedtechnologies,includingsamplechaptersandcodeexamplesONDotnetcomprovidesindependentcoverageoffundamental,interoperable,andemergingMicrosoftNETprogrammingandwebservicestechnologiesConferencesO’ReillyMediabringdiverseinnovatorstogethertonurturetheideasthatsparkrevolutionaryindustriesWespecializeindocumentingthelatesttoolsandsystems,translatingtheinnovator’sknowledgeintousefulskillsforthoseinthetrenchesVisitconferencesoreillycomforourupcomingeventsSafariBookshelf(safarioreillycom)isthepremieronlinereferencelibraryforprogrammersandITprofessionalsConductsearchesacrossmorethan,booksSubscriberscanzeroinonanswerstotimecriticalquestionsinamatterofsecondsReadthebooksonyourBookshelffromcovertocoverorsimplyfliptothepageyouneedTryittodayforfreehttp:downzzbaikecomebook。HighPerformanceMySQLSECONDEDITIONBaronSchwartz,PeterZaitsev,VadimTkachenko,JeremyDZawodny,ArjenLentz,andDerekJBallingBeijing•Cambridge•Farnham•Köln•Sebastopol•Taipei•Tokyohttp:downzzbaikecomebook。HighPerformanceMySQL,SecondEditionbyBaronSchwartz,PeterZaitsev,VadimTkachenko,JeremyDZawodny,ArjenLentz,andDerekJBallingCopyright©O’ReillyMedia,IncAllrightsreservedPrintedintheUnitedStatesofAmericaPublishedbyO’ReillyMedia,Inc,GravensteinHighwayNorth,Sebastopol,CAO’Reillybooksmaybepurchasedforeducational,business,orsalespromotionaluseOnlineeditionsarealsoavailableformosttitles(safarioreillycom)Formoreinformation,contactourcorporateinstitutionalsalesdepartment:()orcorporateoreillycomEditor:AndyOramProductionEditor:LoranahDimantCopyeditor:RachelWheelerProofreader:LoranahDimantIndexer:AngelaHowardCoverDesigner:KarenMontgomeryInteriorDesigner:DavidFutatoIllustrators:JessamynReadPrintingHistory:April:FirstEditionJune:SecondEditionNutshellHandbook,theNutshellHandbooklogo,andtheO’ReillylogoareregisteredtrademarksofO’ReillyMedia,IncHighPerformanceMySQL,theimageofasparrowhawk,andrelatedtradedressaretrademarksofO’ReillyMedia,IncManyofthedesignationsusedbymanufacturersandsellerstodistinguishtheirproductsareclaimedastrademarksWherethosedesignationsappearinthisbook,andO’ReillyMedia,Incwasawareofatrademarkclaim,thedesignationshavebeenprintedincapsorinitialcapsWhileeveryprecautionhasbeentakeninthepreparationofthisbook,thepublisherandauthorsassumenoresponsibilityforerrorsoromissions,orfordamagesresultingfromtheuseoftheinformationcontainedhereinThisbookusesRepKover™,adurableandflexiblelayflatbindingISBN:Mhttp:downzzbaikecomebook。vTableofContentsForewordixPrefacexiMySQLArchitectureMySQL’sLogicalArchitectureConcurrencyControlTransactionsMultiversionConcurrencyControlMySQL’sStorageEnginesFindingBottlenecks:BenchmarkingandProfilingWhyBenchmarkBenchmarkingStrategiesBenchmarkingTacticsBenchmarkingToolsBenchmarkingExamplesProfilingOperatingSystemProfilingSchemaOptimizationandIndexingChoosingOptimalDataTypesIndexingBasicsIndexingStrategiesforHighPerformanceAnIndexingCaseStudyIndexandTableMaintenanceNormalizationandDenormalizationSpeedingUpALTERTABLENotesonStorageEngineshttp:downzzbaikecomebook。vi|TableofContentsQueryPerformanceOptimizationSlowQueryBasics:OptimizeDataAccessWaystoRestructureQueriesQueryExecutionBasicsLimitationsoftheMySQLQueryOptimizerOptimizingSpecificTypesofQueriesQueryOptimizerHintsUserDefinedVariablesAdvancedMySQLFeaturesTheMySQLQueryCacheStoringCodeInsideMySQLCursorsPreparedStatementsUserDefinedFunctionsViewsCharacterSetsandCollationsFullTextSearchingForeignKeyConstraintsMergeTablesandPartitioningDistributed(XA)TransactionsOptimizingServerSettingsConfigurationBasicsGeneralTuningTuningMySQL’sIOBehaviorTuningMySQLConcurrencyWorkloadBasedTuningTuningPerConnectionSettingsOperatingSystemandHardwareOptimizationWhatLimitsMySQL’sPerformanceHowtoSelectCPUsforMySQLBalancingMemoryandDiskResourcesChoosingHardwareforaSlaveRAIDPerformanceOptimizationStorageAreaNetworksandNetworkAttachedStorageUsingMultipleDiskVolumesNetworkConfigurationhttp:downzzbaikecomebook。TableofContents|viiChoosinganOperatingSystemChoosingaFilesystemThreadingSwappingOperatingSystemStatusReplicationReplicationOverviewSettingUpReplicationReplicationUndertheHoodReplicationTopologiesReplicationandCapacityPlanningReplicationAdministrationandMaintenanceReplicationProblemsandSolutionsHowFastIsReplicationTheFutureofMySQLReplicationScalingandHighAvailabilityTerminologyScalingMySQLLoadBalancingHighAvailabilityApplicationLevelOptimizationApplicationPerformanceOverviewWebServerIssuesCachingExtendingMySQLAlternativestoMySQLBackupandRecoveryOverviewConsiderationsandTradeoffsManagingandBackingUpBinaryLogsBackingUpDataRecoveringfromaBackupBackupandRecoverySpeedBackupToolsScriptingBackupshttp:downzzbaikecomebook。viii|TableofContentsSecurityTerminologyAccountBasicsOperatingSystemSecurityNetworkSecurityDataEncryptionMySQLinachrootedEnvironmentMySQLServerStatusSystemVariablesSHOWSTATUSSHOWINNODBSTATUSSHOWPROCESSLISTSHOWMUTEXSTATUSReplicationStatusINFORMATIONSCHEMAToolsforHighPerformanceInterfaceToolsMonitoringToolsAnalysisToolsMySQLUtilitiesSourcesofFurtherInformationATransferringLargeFilesBUsingEXPLAINCUsingSphinxwithMySQLDDebuggingLocksIndexhttp:downzzbaikecomebook。ixForewordIhaveknownPeter,Vadim,andArjenalongtimeandhavewitnessedtheirlonghistoryofbothusingMySQLfortheirownprojectsandtuningitforalotofdifferenthighprofilecustomersOnhisside,BaronhaswrittenclientsoftwarethatenhancestheusabilityofMySQLTheauthors’backgroundsareclearlyreflectedintheircompletereworkinginthissecondeditionofHighPerformanceMySQL:Optimizations,Replication,Backups,andMoreIt’snotjustabookthattellsyouhowtooptimizeyourworktouseMySQLbetterthaneverbeforeTheauthorshavedoneconsiderableextrawork,carryingoutandpublishingbenchmarkresultstoprovetheirpointsThiswillgiveyou,thereader,alotofvaluableinsightintoMySQL’sinnerworkingsthatyoucan’teasilyfindinanyotherbookInturn,thatwillallowyoutoavoidalotofmistakesinthefuturethatcanleadtosuboptimalperformanceIrecommendthisbookbothtonewusersofMySQLwhohaveplayedwiththeserveralittleandnowarereadytowritetheirfirstrealapplications,andtoexperienceduserswhoalreadyhavewelltunedMySQLbasedapplicationsbutneedtoget“alittlemore”outofthemMichaelWideniusMarchhttp:downzzbaikecomebook。http:downzzbaikecomebook。xiPrefaceWehadseveralgoalsinmindforthisbookManyofthemwerederivedfromthinkingaboutthatmythicalperfectMySQLbookthatnoneofushadreadbutthatwekeptlookingforonbookstoreshelvesOtherscamefromalotofexperiencehelpingotherusersputMySQLtoworkintheirenvironmentsWewantedabookthatwasn’tjustaSQLprimerWewantedabookwithatitlethatdidn’tstartorendinsomearbitrarytimeframe(“inThirtyDays,”“SevenDaysToaBetter”)anddidn’ttalkdowntothereaderMostofall,wewantedabookthatwouldhelpyoutakeyourskillstothenextlevelandbuildfast,reliablesystemswithMySQLonethatwouldanswerquestionslike“HowcanIsetupaclusterofMySQLserverscapableofhandlingmillionsuponmillionsofqueriesandensurethatthingskeeprunningevenifacoupleoftheserversdie”WedecidedtowriteabookthatfocusednotjustontheneedsoftheMySQLapplicationdeveloperbutalsoontherigorousdemandsoftheMySQLadministrator,whoneedstokeepthesystemupandrunningnomatterwhattheprogrammersorusersmaythrowattheserverHavingsaidthat,weassumethatyouarealreadyrelativelyexperiencedwithMySQLand,ideally,havereadanintroductorybookonitWealsoassumesomeexperiencewithgeneralsystemadministration,networking,andUnixlikeoperatingsystemsThisrevisedandexpandedsecondeditionincludesdeepercoverageofallthetopicsinthefirsteditionandmanynewtopicsaswellThisispartlyaresponsetothechangesthathavetakenplacesincethebookwasfirstpublished:MySQLisamuchlargerandmorecomplexpieceofsoftwarenowJustasimportantly,itspopularityhasexplodedTheMySQLcommunityhasgrownmuchlarger,andbigcorporationsarenowadoptingMySQLfortheirmissioncriticalapplicationsSincethefirstedition,MySQLhasbecomerecognizedasreadyfortheenterprise*Peoplearealso*Wethinkthisphraseismostlymarketingfluff,butitseemstoconveyasenseofimportancetoalotofpeoplehttp:downzzbaikecomebook。xii|PrefaceusingitmoreandmoreinapplicationsthatareexposedtotheInternet,wheredowntimeandotherproblemscannotbeconcealedortoleratedAsaresult,thissecondeditionhasaslightlydifferentfocusthanthefirsteditionWeemphasizereliabilityandcorrectnessjustasmuchasperformance,inpartbecausewehaveusedMySQLourselvesforapplicationswheresignificantamountsofmoneyareridingonthedatabaseserverWealsohavedeepexperienceinwebapplications,whereMySQLhasbecomeverypopularThesecondeditionspeakstotheexpandedworldofMySQL,whichdidn’texistinthesamewaywhenthefirsteditionwaswrittenHowThisBookIsOrganizedWefitalotofcomplicatedtopicsintothisbookHere,weexplainhowweputthemtogetherinanorderthatmakesthemeasiertolearnABroadOverviewChapter,MySQLArchitecture,isdedicatedtothebasicsthingsyou’llneedtobefamiliarwithbeforeyoudigindeeplyYouneedtounderstandhowMySQLisorganizedbeforeyou’llbeabletouseiteffectivelyThischapterexplainsMySQL’sarchitectureandkeyfactsaboutitsstorageenginesIthelpsyougetuptospeedifyouaren’tfamiliarwithsomeofthefundamentalsofarelationaldatabase,includingtransactionsThischapterwillalsobeusefulifthisbookisyourintroductiontoMySQLbutyou’realreadyfamiliarwithanotherdatabase,suchasOracleBuildingaSolidFoundationThenextfourchapterscovermaterialyou’llfindyourselfreferencingoverandoverasyouuseMySQLChapter,FindingBottlenecks:BenchmarkingandProfiling,discussesthebasicsofbenchmarkingandprofilingthatis,determiningwhatsortofworkloadyourservercanhandle,howfastitcanperformcertaintasks,andsoonYou’llwanttobenchmarkyourapplicationbothbeforeandafteranymajorchange,soyoucanjudgehoweffectiveyourchangesareWhatseemstobeapositivechangemayturnouttobeanegativeoneunderrealworldstress,andyou’llneverknowwhat’sreallycausingpoorperformanceunlessyoumeasureitaccuratelyInChapter,SchemaOptimizationandIndexing,wecoverthevariousnuancesofdatatypes,tabledesign,andindexesAwelldesignedschemahelpsMySQLperformmuchbetter,andmanyofthethingswediscussinlaterchaptershingeonhowwellyourapplicationputsMySQL’sindexestoworkAfirmunderstandingofindexesandhowtousethemwellisessentialforusingMySQLeffectively,soyou’llprobablyfindyourselfreturningtothischapterrepeatedlyhttp:downzzbaikecomebook。Preface|xiiiChapter,QueryPerformanceOptimization,explainshowMySQLexecutesqueriesandhowyoucantakeadvantageofitsqueryoptimizer’sstrengthsHavingafirmgraspofhowthequeryoptimizerworkswilldowondersforyourqueriesandwillhelpyouunderstandindexesbetter(IndexingandqueryoptimizationaresortofachickenandeggproblemreadingChapteragainafteryoureadChaptermightbeuseful)Thischapteralsopresentsspecificexamplesofvirtuallyallcommonclassesofqueries,illustratingwhereMySQLdoesagoodjobandhowtotransformqueriesintoformsthattakeadvantageofitsstrengthsUptothispoint,we’vecoveredthebasictopicsthatapplytoanydatabase:tables,indexes,data,andqueriesChapter,AdvancedMySQLFeatures,goesbeyondthebasicsandshowsyouhowMySQL’sadvancedfeaturesworkWeexaminethequerycache,storedprocedures,triggers,charactersets,andmoreMySQL’simplementationofthesefeaturesisdifferentfromotherdatabases,andagoodunderstandingofthemcanopenupnewopportunitiesforperformancegainsthatyoumightnothavethoughtaboutotherwiseTuningYourApplicationThenexttwochaptersdiscusshowtomakechangestoimproveyourMySQLbasedapplication’sperformanceInChapter,OptimizingServerSettings,wediscusshowyoucantuneMySQLtomakethemostofyourhardwareandtoworkaswellaspossibleforyourspecificapplicationChapter,OperatingSystemandHardwareOptimization,explainshowtogetthemostoutofyouroperatingsystemandhardwareWealsosuggesthardwareconfigurationsthatmayprovidebetterperformanceforlargerscaleapplicationsScalingUpwardAfterMakingChangesOneserverisn’talwaysenoughInChapter,Replication,wediscussreplicationthatis,gettingyourdatacopiedautomaticallytomultipleserversWhencombinedwiththescaling,loadbalancing,andhighavailabilitylessonsinChapter,ScalingandHighAvailability,thiswillprovideyouwiththegroundworkforscalingyourapplicationsaslargeasyouneedthemtobeAnapplicationthatrunsonalargescaleMySQLbackendoftenprovidessignificantopportunitiesforoptimizationintheapplicationitselfTherearebetterandworsewaystodesignlargeapplicationsWhilethisisn’ttheprimaryfocusofthebook,wedon’twantyoutospendallyourtimeconcentratingonMySQLChapter,ApplicationLevelOptimization,willhelpyoudiscoverthelowhangingfruitinyouroverallarchitecture,especiallyifit’sawebapplicationhttp:downzzbaikecomebook。xiv|PrefaceMakingYourApplicationReliableThebestdesigned,mostscalablearchitectureintheworldisnogoodifitcan’tsurvivepoweroutages,maliciousattacks,applicationbugsorprogrammermistakes,andotherdisastersInChapter,BackupandRecovery,wediscussvariousbackupandrecoverystrategiesforyourMySQLdatabasesThesestrategieswillhelpminimizeyourdowntimeintheeventofinevitablehardwarefailureandensurethatyourdatasurvivessuchcatastrophesChapter,Security,providesyouwithafirmgraspofsomeofthesecurityissuesinvolvedinrunningaMySQLserverMoreimportantly,weoffermanysuggestionstoallowyoutopreventoutsidepartiesfromharmingtheserversyou’vespentallthistimetryingtoconfigureandoptimizeWeexplainsomeoftherarelyexploredareasofdatabasesecurity,showingboththebenefitsandperformanceimpactsofvariouspracticesUsually,intermsofperformance,itpaystokeepsecuritypoliciessimpleMiscellaneousUsefulTopicsInthelastfewchaptersandthebook’sappendixes,wedelveintoseveraltopicsthateitherdon’t“fit”inanyoftheearlierchaptersorarereferencedoftenenoughinmultiplechaptersthattheydeserveabitofspecialattentionChapter,MySQLServerStatusshowsyouhowtoinspectyourMySQLserverKnowinghowtogetstatusinformationfromtheser

用户评价(0)

关闭

新课改视野下建构高中语文教学实验成果报告(32KB)

抱歉,积分不足下载失败,请稍后再试!

提示

试读已结束,如需要继续阅读或者下载,敬请购买!

评分:

/47

意见
反馈

立即扫码关注

爱问共享资料微信公众号

返回
顶部

举报
资料