%3CLINGO-SUB%20id%3D%22lingo-sub-1095989%22%20slang%3D%22en-US%22%3EAzure%20Database%20for%20MySQL%20-%20Checklist%20for%20Performance%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-1095989%22%20slang%3D%22en-US%22%3E%3CP%3E%3CSTRONG%3E%3CFONT%20size%3D%225%22%3EIntroduction%3A%3C%2FFONT%3E%3C%2FSTRONG%3E%3C%2FP%3E%0A%3CP%3E%3CSPAN%20style%3D%22display%3A%20inline%20!important%3B%20float%3A%20none%3B%20background-color%3A%20%23ffffff%3B%20color%3A%20%23333333%3B%20cursor%3A%20text%3B%20font-family%3A%20inherit%3B%20font-size%3A%2016px%3B%20font-style%3A%20normal%3B%20font-variant%3A%20normal%3B%20font-weight%3A%20300%3B%20letter-spacing%3A%20normal%3B%20line-height%3A%201.7142%3B%20orphans%3A%202%3B%20text-align%3A%20left%3B%20text-decoration%3A%20none%3B%20text-indent%3A%200px%3B%20text-transform%3A%20none%3B%20-webkit-text-stroke-width%3A%200px%3B%20white-space%3A%20normal%3B%20word-spacing%3A%200px%3B%22%3EDo%20you%20want%20to%20know%20which%20checklist%20needs%20to%20be%20followed%20when%20you%20are%20working%20with%20Azure%20Database%20for%20MySQL%3F%20Please%20follow%20the%20below-given%20information%20to%20pro-actively%20and%20re-actively%20make%20your%20server%20better.%20If%20you%20are%20facing%20Performance%20problems%20with%20Azure%20Database%20for%20MySQL%2C%20these%20can%20often%20be%20resolved%20by%20doing%20basic%20troubleshooting%20and%20by%20setting%20best%20practices%20in%20advance.%3C%2FSPAN%3E%3C%2FP%3E%0A%3CP%3E%26nbsp%3B%3C%2FP%3E%0A%3CP%3E%3CSTRONG%3E%3CFONT%20size%3D%225%22%3EOptimize%20connection%20between%20the%20application%20and%20Azure%20Database%20for%20MySQL%3A%3C%2FFONT%3E%3C%2FSTRONG%3E%3C%2FP%3E%0A%3CUL%3E%0A%3CLI%3E%3CSPAN%20style%3D%22display%3A%20inline%20!important%3B%20float%3A%20none%3B%20background-color%3A%20%23ffffff%3B%20color%3A%20%23333333%3B%20cursor%3A%20text%3B%20font-family%3A%20inherit%3B%20font-size%3A%2016px%3B%20font-style%3A%20normal%3B%20font-variant%3A%20normal%3B%20font-weight%3A%20300%3B%20letter-spacing%3A%20normal%3B%20line-height%3A%201.7142%3B%20orphans%3A%202%3B%20text-align%3A%20left%3B%20text-decoration%3A%20none%3B%20text-indent%3A%200px%3B%20text-transform%3A%20none%3B%20-webkit-text-stroke-width%3A%200px%3B%20white-space%3A%20normal%3B%20word-spacing%3A%200px%3B%22%3E%3CFONT%20style%3D%22background-color%3A%20%23ffffff%3B%22%3E%3CSTRONG%3EPhysical%20Proximity%3A%3C%2FSTRONG%3E%20You%20can%20significantly%20increase%20the%20application%20throughput%20by%20creating%20the%20application%20server%20and%20database%20service%20in%20the%20same%20region.%20Make%20sure%20you%20deploy%20an%20application%20and%20the%20database%20in%20the%20same%20region.%20A%20quick%20check%20before%20starting%20any%20performance%20benchmarking%20run%20is%20to%20determine%20the%20network%20latency%20between%20the%20client%20and%20database%20using%20a%20simple%20SELECT%201%20query.%20%3C%2FFONT%3E%3C%2FSPAN%3EWe%20have%20seen%20customers%20report%20significant%20improvement%20in%20throughput%20when%20the%20client%20and%20Azure%20Database%20for%20MySQL%20is%20in%20the%20same%20region.%3C%2FLI%3E%0A%3CLI%3E%3CSPAN%20style%3D%22display%3A%20inline%20!important%3B%20float%3A%20none%3B%20background-color%3A%20%23ffffff%3B%20color%3A%20%23333333%3B%20cursor%3A%20text%3B%20font-family%3A%20inherit%3B%20font-size%3A%2016px%3B%20font-style%3A%20normal%3B%20font-variant%3A%20normal%3B%20font-weight%3A%20300%3B%20letter-spacing%3A%20normal%3B%20line-height%3A%201.7142%3B%20orphans%3A%202%3B%20text-align%3A%20left%3B%20text-decoration%3A%20none%3B%20text-indent%3A%200px%3B%20text-transform%3A%20none%3B%20-webkit-text-stroke-width%3A%200px%3B%20white-space%3A%20normal%3B%20word-spacing%3A%200px%3B%22%3E%3CFONT%20style%3D%22background-color%3A%20%23ffffff%3B%22%3E%3CSTRONG%3EAccelerated%20Networking%3A%3C%2FSTRONG%3E%20Use%20accelerated%20networking%20for%20the%20application%20server%2Fclient%20machine%2C%20wherever%20it%20is%20applicable.%20Accelerated%20Networking%20enables%20single%20root%20I%2FO%20virtualization%20(SR-IOV)%20to%20a%20VM%2C%20greatly%20improving%20its%20networking%20performance.%20This%20high-performance%20path%20bypasses%20the%20host%20from%20the%20datapath%2C%20reducing%20latency%2C%20jitter%2C%20and%20CPU%20utilization%2C%20for%20use%20with%20the%20most%20demanding%20network%20workloads%20on%20supported%20VM%20types.%20For%20more%20information%20please%20refer%20to%20%3CA%20href%3D%22https%3A%2F%2Fdocs.microsoft.com%2Fen-us%2Fazure%2Fvirtual-network%2Fcreate-vm-accelerated-networking-cli%22%20target%3D%22_self%22%20rel%3D%22noopener%20noreferrer%20noopener%20noreferrer%22%3Ecreate%20a%20virtual%20machine%20with%20accelerated%20networking%3C%2FA%3E.%3CBR%20%2F%3E%3C%2FFONT%3E%3C%2FSPAN%3E%3C%2FLI%3E%0A%3CLI%3E%3CSPAN%20style%3D%22display%3A%20inline%20!important%3B%20float%3A%20none%3B%20background-color%3A%20%23ffffff%3B%20color%3A%20%23333333%3B%20cursor%3A%20text%3B%20font-family%3A%20inherit%3B%20font-size%3A%2016px%3B%20font-style%3A%20normal%3B%20font-variant%3A%20normal%3B%20font-weight%3A%20300%3B%20letter-spacing%3A%20normal%3B%20line-height%3A%201.7142%3B%20orphans%3A%202%3B%20text-align%3A%20left%3B%20text-decoration%3A%20none%3B%20text-indent%3A%200px%3B%20text-transform%3A%20none%3B%20-webkit-text-stroke-width%3A%200px%3B%20white-space%3A%20normal%3B%20word-spacing%3A%200px%3B%22%3E%3CFONT%20style%3D%22background-color%3A%20%23ffffff%3B%22%3E%3CSTRONG%3E%3CA%20href%3D%22https%3A%2F%2Fdocs.microsoft.com%2Fen-us%2Fazure%2Fmysql%2Fconcepts-connectivity%23connect-efficiently-to-azure-database-for-mysql%22%20target%3D%22_self%22%20rel%3D%22noopener%20noreferrer%20noopener%20noreferrer%22%3EConnecting%20Efficiently%3C%2FA%3E%3A%3C%2FSTRONG%3E%20Establishing%20a%20new%20connection%20is%20always%20an%20expensive%20and%20time-consuming%20task%2C%20reduce%20the%20number%20of%20attempts%20to%20create%20new%20connections%20by%20implementing%20the%20following%20approaches.%3CBR%20%2F%3E%3C%2FFONT%3E%3C%2FSPAN%3E%3CUL%3E%0A%3CLI%3E%3CSPAN%20style%3D%22display%3A%20inline%20!important%3B%20float%3A%20none%3B%20background-color%3A%20%23ffffff%3B%20color%3A%20%23333333%3B%20cursor%3A%20text%3B%20font-family%3A%20inherit%3B%20font-size%3A%2016px%3B%20font-style%3A%20normal%3B%20font-variant%3A%20normal%3B%20font-weight%3A%20300%3B%20letter-spacing%3A%20normal%3B%20line-height%3A%201.7142%3B%20orphans%3A%202%3B%20text-align%3A%20left%3B%20text-decoration%3A%20none%3B%20text-indent%3A%200px%3B%20text-transform%3A%20none%3B%20-webkit-text-stroke-width%3A%200px%3B%20white-space%3A%20normal%3B%20word-spacing%3A%200px%3B%22%3E%3CFONT%20style%3D%22background-color%3A%20%23ffffff%3B%22%3E%3CSTRONG%3EConnection%20Pooling%3A%3C%2FSTRONG%3E%20Is%20a%20mechanism%20that%20manages%20the%20creation%20and%20allocation%20of%20database%20connections.%20When%20a%20program%2Fapplication%20requests%20a%20database%20connection%2C%20it%20prioritizes%20the%20allocation%20of%20existing%20idle%20database%20connections%20rather%20than%20creating%20a%20new%20one.%20For%20connection%20pooling%2C%20you%20can%20leverage%20%3CA%20href%3D%22https%3A%2F%2Fnam06.safelinks.protection.outlook.com%2F%3Furl%3Dhttps%253A%252F%252Fwww.proxysql.com%252F%26amp%3Bdata%3D02%257C01%257CAmol.Bhatnagar%2540microsoft.com%257C320af72f2669430b7c8208d79fe403df%257C72f988bf86f141af91ab2d7cd011db47%257C1%257C0%257C637153674007199577%26amp%3Bsdata%3D2iPcwsec1UhkCa6wVoj%252BFiyvqFyS4KV0tYYrXq516Gs%253D%26amp%3Breserved%3D0%22%20target%3D%22_blank%22%20rel%3D%22nofollow%20noopener%20noreferrer%20noopener%20noreferrer%22%3EProxySQL%3C%2FA%3E%2C%20an%20open%20source%2C%20high%20performance%20proxy%20which%20provide%20built-in%20connection%20pooling%20and%20further%20allows%20you%20to%20%3CA%20href%3D%22https%3A%2F%2Fnam06.safelinks.protection.outlook.com%2F%3Furl%3Dhttps%253A%252F%252Ftechcommunity.microsoft.com%252Ft5%252Fazure-database-for-mysql%252Fscaling-an-azure-database-for-mysql-workload-running-on%252Fba-p%252F1105847%26amp%3Bdata%3D02%257C01%257CAmol.Bhatnagar%2540microsoft.com%257C320af72f2669430b7c8208d79fe403df%257C72f988bf86f141af91ab2d7cd011db47%257C1%257C0%257C637153674007199577%26amp%3Bsdata%3DFtiXXSeaNuUYDVXjMxYmkrjEibq1nRjEf3CHDdX%252FNAI%253D%26amp%3Breserved%3D0%22%20target%3D%22_blank%22%20rel%3D%22nofollow%20noopener%20noreferrer%20noopener%20noreferrer%22%3Escale%20out%3C%2FA%3E%20and%20%3CA%20href%3D%22https%3A%2F%2Fnam06.safelinks.protection.outlook.com%2F%3Furl%3Dhttps%253A%252F%252Ftechcommunity.microsoft.com%252Ft5%252Fazure-database-for-mysql%252Fload-balance-read-replicas-using-proxysql-in-azure-database-for%252Fba-p%252F880042%26amp%3Bdata%3D02%257C01%257CAmol.Bhatnagar%2540microsoft.com%257C320af72f2669430b7c8208d79fe403df%257C72f988bf86f141af91ab2d7cd011db47%257C1%257C0%257C637153674007209572%26amp%3Bsdata%3D6g8l2n6g2sYP2IhfaSQv36DLVdPMUvRAFikr8CCIzrE%253D%26amp%3Breserved%3D0%22%20target%3D%22_blank%22%20rel%3D%22nofollow%20noopener%20noreferrer%20noopener%20noreferrer%22%3Eload%20balance%20your%20workload%3C%2FA%3E%20to%20multiple%20read%20replicas%20as%20required%20on%20demand%20with%20any%20changes%20in%20application%20code.%20Alternatively%2C%20you%20can%20also%20leverage%20Heimdall%20Data%20Proxy%2C%20a%20vendor-neutral%20proprietary%20proxy%20solution.%20It%20supports%20query%20caching%20and%20read%2Fwrite%20split%20with%20replication%20lag%20detection.%20You%20can%20also%20refer%20to%20how%20to%26nbsp%3B%3CA%20href%3D%22https%3A%2F%2Fnam06.safelinks.protection.outlook.com%2F%3Furl%3Dhttps%253A%252F%252Ftechcommunity.microsoft.com%252Ft5%252Fazure-database-for-mysql%252Faccelerate-mysql-performance-with-the-heimdall-proxy%252Fba-p%252F1063349%26amp%3Bdata%3D02%257C01%257CAmol.Bhatnagar%2540microsoft.com%257C320af72f2669430b7c8208d79fe403df%257C72f988bf86f141af91ab2d7cd011db47%257C1%257C0%257C637153674007209572%26amp%3Bsdata%3D%252FB60t7gGRmpB6ttR%252F%252FR5mtvxuVoMgYDOp8pYRRVb%252F%252Bs%253D%26amp%3Breserved%3D0%22%20target%3D%22_blank%22%20rel%3D%22nofollow%20noopener%20noreferrer%20noopener%20noreferrer%22%3Eaccelerate%20MySQL%20Performance%20with%20the%20Heimdall%20proxy%3C%2FA%3E.%20%26nbsp%3B%3C%2FFONT%3E%3C%2FSPAN%3E%3C%2FLI%3E%0A%3CLI%3E%3CSPAN%20style%3D%22display%3A%20inline%20!important%3B%20float%3A%20none%3B%20background-color%3A%20%23ffffff%3B%20color%3A%20%23333333%3B%20cursor%3A%20text%3B%20font-family%3A%20inherit%3B%20font-size%3A%2016px%3B%20font-style%3A%20normal%3B%20font-variant%3A%20normal%3B%20font-weight%3A%20300%3B%20letter-spacing%3A%20normal%3B%20line-height%3A%201.7142%3B%20orphans%3A%202%3B%20text-align%3A%20left%3B%20text-decoration%3A%20none%3B%20text-indent%3A%200px%3B%20text-transform%3A%20none%3B%20-webkit-text-stroke-width%3A%200px%3B%20white-space%3A%20normal%3B%20word-spacing%3A%200px%3B%22%3E%3CFONT%20style%3D%22background-color%3A%20%23ffffff%3B%22%3E%3CSTRONG%3EPersistent%20or%20Long-Lived%20Connection%3A%3C%2FSTRONG%3E%20If%20your%20application%20has%20short%20transactions%2Fqueries%20typically%20with%20execution%20time%20%26lt%3B%205-10%20ms%20then%20replace%20short%20connections%20with%20persistent%20connections.%20Replace%20short%20connections%20with%20persistent%20connections%20requires%20only%20minor%20changes%20to%20the%20code%2C%20but%20it%20has%20a%20major%20effect%20in%20terms%20of%20improving%20performance%20in%20many%20typical%20application%20scenarios.%20By%20using%20this%20approach%20you%20can%20avoid%20opening%20a%20new%20request%20for%20each%20connection%20instead%20reuse%20the%20existing%20connection%20to%20send%20more%20requests.%20Please%20make%20sure%20to%20set%20the%20timeout%20or%20close%20connection%20when%20it%20is%20done.%3C%2FFONT%3E%3C%2FSPAN%3E%3C%2FLI%3E%0A%3C%2FUL%3E%0A%3C%2FLI%3E%0A%3C%2FUL%3E%0A%3CP%3E%26nbsp%3B%3C%2FP%3E%0A%3CP%3E%3CSTRONG%3E%3CFONT%20size%3D%225%22%3EBasic%20Monitoring%20-%20What%2C%20How%20%26amp%3B%20When%3A%3C%2FFONT%3E%3C%2FSTRONG%3E%3C%2FP%3E%0A%3CP%3E%3CSPAN%20style%3D%22display%3A%20inline%20!important%3B%20float%3A%20none%3B%20background-color%3A%20%23ffffff%3B%20color%3A%20%23333333%3B%20cursor%3A%20text%3B%20font-family%3A%20inherit%3B%20font-size%3A%2016px%3B%20font-style%3A%20normal%3B%20font-variant%3A%20normal%3B%20font-weight%3A%20300%3B%20letter-spacing%3A%20normal%3B%20line-height%3A%201.7142%3B%20orphans%3A%202%3B%20text-align%3A%20left%3B%20text-decoration%3A%20none%3B%20text-indent%3A%200px%3B%20text-transform%3A%20none%3B%20-webkit-text-stroke-width%3A%200px%3B%20white-space%3A%20normal%3B%20word-spacing%3A%200px%3B%22%3E%3CFONT%20style%3D%22background-color%3A%20%23ffffff%3B%22%3EKeep%20a%20track%20of%20the%20resource%20limit%20by%20using%20%3CA%20href%3D%22https%3A%2F%2Fdocs.microsoft.com%2Fen-us%2Fazure%2Fazure-monitor%2Foverview%22%20target%3D%22_self%22%20rel%3D%22noopener%20noreferrer%20noopener%20noreferrer%22%3EAzure%20Monitor%3C%2FA%3E%2C%20by%20setting%20alerts%20on%20%3CA%20href%3D%22https%3A%2F%2Fdocs.microsoft.com%2Fen-us%2Fazure%2Fazure-monitor%2Fplatform%2Fdata-platform-metrics%22%20target%3D%22_self%22%20rel%3D%22noopener%20noreferrer%20noopener%20noreferrer%22%3EMetrics%3C%2FA%3E%20and%20by%20using%20an%20%3CA%20href%3D%22https%3A%2F%2Fazure.microsoft.com%2Fen-in%2Fservices%2Fadvisor%2F%22%20target%3D%22_self%22%20rel%3D%22noopener%20noreferrer%20noopener%20noreferrer%22%3EAzure%20Advisor%3C%2FA%3E.%20Please%20find%20below%20the%20common%20performance%20scenarios%20and%20their%20solutions%3A%26nbsp%3B%3CBR%20%2F%3E%3C%2FFONT%3E%3C%2FSPAN%3E%3C%2FP%3E%0A%3CUL%3E%0A%3CLI%3E%3CSPAN%20style%3D%22display%3A%20inline%20!important%3B%20float%3A%20none%3B%20background-color%3A%20%23ffffff%3B%20color%3A%20%23333333%3B%20cursor%3A%20text%3B%20font-family%3A%20inherit%3B%20font-size%3A%2016px%3B%20font-style%3A%20normal%3B%20font-variant%3A%20normal%3B%20font-weight%3A%20300%3B%20letter-spacing%3A%20normal%3B%20line-height%3A%201.7142%3B%20orphans%3A%202%3B%20text-align%3A%20left%3B%20text-decoration%3A%20none%3B%20text-indent%3A%200px%3B%20text-transform%3A%20none%3B%20-webkit-text-stroke-width%3A%200px%3B%20white-space%3A%20normal%3B%20word-spacing%3A%200px%3B%22%3E%3CFONT%20style%3D%22background-color%3A%20%23ffffff%3B%22%3E%3CSTRONG%3ECPU%20usage%20consistently%20hitting%20upper%20limits%3C%2FSTRONG%3E%20then%20increase%20the%20number%20of%20cores.%20Also%2C%20find%20out%20resource-intensive%20queries%20using%20%3CA%20href%3D%22https%3A%2F%2Fdocs.microsoft.com%2Fen-us%2Fazure%2Fmysql%2Fconcepts-query-performance-insight%22%20target%3D%22_self%22%20rel%3D%22noopener%20noreferrer%20noopener%20noreferrer%22%3EQuery%20Performance%20Insights%3C%2FA%3E%20and%20take%20corrective%20action.%20Use%20Query%20Store%2C%20Query%20Performance%20Recommendation%20to%20identify%20queries%20with%20the%20longest%20duration%2C%20most%20executed.%20Explore%20opportunities%20to%20optimize.%3C%2FFONT%3E%3C%2FSPAN%3E%3C%2FLI%3E%0A%3CLI%3E%3CSPAN%20style%3D%22display%3A%20inline%20!important%3B%20float%3A%20none%3B%20background-color%3A%20%23ffffff%3B%20color%3A%20%23333333%3B%20cursor%3A%20text%3B%20font-family%3A%20inherit%3B%20font-size%3A%2016px%3B%20font-style%3A%20normal%3B%20font-variant%3A%20normal%3B%20font-weight%3A%20300%3B%20letter-spacing%3A%20normal%3B%20line-height%3A%201.7142%3B%20orphans%3A%202%3B%20text-align%3A%20left%3B%20text-decoration%3A%20none%3B%20text-indent%3A%200px%3B%20text-transform%3A%20none%3B%20-webkit-text-stroke-width%3A%200px%3B%20white-space%3A%20normal%3B%20word-spacing%3A%200px%3B%22%3E%3CFONT%20style%3D%22background-color%3A%20%23ffffff%3B%22%3E%3CSTRONG%3EReaching%20maximum%20IOPS%3C%2FSTRONG%3E%20then%20increase%20storage%20provisioning%20to%20align%20with%20IOPS%20requirements.%20IOPS%20are%20dependent%20on%20storage%20(3%20IOPS%20per%20GB).%20When%20storage%20hits%20the%20%3CA%20href%3D%22https%3A%2F%2Fdocs.microsoft.com%2Fen-us%2Fazure%2Fmysql%2Fconcepts-pricing-tiers%23storage%22%20target%3D%22_self%22%20rel%3D%22noopener%20noreferrer%20noopener%20noreferrer%22%3Eupper%20limit%3C%2FA%3E%20the%20server%20will%20be%20marked%20as%20read-only.%20You%20can%20configure%20%3CA%20href%3D%22https%3A%2F%2Fdocs.microsoft.com%2Fen-us%2Fazure%2Fmysql%2Fhowto-auto-grow-storage-portal%22%20target%3D%22_self%22%20rel%3D%22noopener%20noreferrer%20noopener%20noreferrer%22%3Eauto%20grow%3C%2FA%3E%20to%20increase%20storage%20by%205%25%20if%20you%20are%20close%20to%20limit.%20You%20can%20also%20find%20out%20costly%20queries%20using%20%3CA%20href%3D%22https%3A%2F%2Fdocs.microsoft.com%2Fen-us%2Fazure%2Fmysql%2Fconcepts-query-performance-insight%22%20target%3D%22_self%22%20rel%3D%22noopener%20noreferrer%20noopener%20noreferrer%22%3EQuery%20Performance%20Insights%3C%2FA%3E%20and%20take%20corrective%20action%20by%20implementing%20an%20Indexing%20strategy.%20Use%20%3CA%20href%3D%22https%3A%2F%2Fdocs.microsoft.com%2Fen-us%2Fazure%2Fmysql%2Fconcepts-query-store%22%20target%3D%22_self%22%20rel%3D%22noopener%20noreferrer%20noopener%20noreferrer%22%3EQuery%20Store%3C%2FA%3E%2C%20%3CA%20href%3D%22https%3A%2F%2Fdocs.microsoft.com%2Fen-us%2Fazure%2Fmysql%2Fconcepts-performance-recommendations%22%20target%3D%22_self%22%20rel%3D%22noopener%20noreferrer%20noopener%20noreferrer%22%3EPerformance%20Recommendation%3C%2FA%3E%20to%20identify%20queries%20with%20the%20longest%20duration%2C%20most%20executed%20and%20explore%20the%20opportunities%20to%20optimize%20it.%3C%2FFONT%3E%3C%2FSPAN%3E%3C%2FLI%3E%0A%3CLI%3E%3CSPAN%20style%3D%22display%3A%20inline%20!important%3B%20float%3A%20none%3B%20background-color%3A%20%23ffffff%3B%20color%3A%20%23333333%3B%20cursor%3A%20text%3B%20font-family%3A%20inherit%3B%20font-size%3A%2016px%3B%20font-style%3A%20normal%3B%20font-variant%3A%20normal%3B%20font-weight%3A%20300%3B%20letter-spacing%3A%20normal%3B%20line-height%3A%201.7142%3B%20orphans%3A%202%3B%20text-align%3A%20left%3B%20text-decoration%3A%20none%3B%20text-indent%3A%200px%3B%20text-transform%3A%20none%3B%20-webkit-text-stroke-width%3A%200px%3B%20white-space%3A%20normal%3B%20word-spacing%3A%200px%3B%22%3E%3CFONT%20style%3D%22background-color%3A%20%23ffffff%3B%22%3E%3CSTRONG%3EWhen%20there%20is%20a%20low%20cache%20hit%20ratio%20issue%3C%2FSTRONG%3E%2C%20increase%20memory%20by%20moving%20to%20the%20higher%20SKU%20of%20the%20same%20tier%20or%20move%20to%20memory-optimized%20SKU.%20Review%20your%20query%20plan%20and%20leverage%20the%20%3CA%20href%3D%22https%3A%2F%2Fdocs.microsoft.com%2Fen-us%2Fazure%2Fmysql%2Fconcepts-query-performance-insight%22%20target%3D%22_self%22%20rel%3D%22noopener%20noreferrer%20noopener%20noreferrer%22%3EQuery%20Performance%20Insights%3C%2FA%3E.%20Use%20%3CA%20href%3D%22https%3A%2F%2Fdocs.microsoft.com%2Fen-us%2Fazure%2Fmysql%2Fconcepts-query-store%22%20target%3D%22_self%22%20rel%3D%22noopener%20noreferrer%20noopener%20noreferrer%22%3EQuery%20Store%3C%2FA%3E%2C%20%3CA%20href%3D%22https%3A%2F%2Fdocs.microsoft.com%2Fen-us%2Fazure%2Fmysql%2Fconcepts-performance-recommendations%22%20target%3D%22_self%22%20rel%3D%22noopener%20noreferrer%20noopener%20noreferrer%22%3EPerformance%20Recommendation%3C%2FA%3E%20to%20identify%20queries%20with%20the%20longest%20duration%2C%20most%20executed.%20Explore%20opportunities%20to%20optimize.%3CBR%20%2F%3E%3C%2FFONT%3E%3C%2FSPAN%3E%3C%2FLI%3E%0A%3CLI%3E%3CSPAN%20style%3D%22display%3A%20inline%20!important%3B%20float%3A%20none%3B%20background-color%3A%20%23ffffff%3B%20color%3A%20%23333333%3B%20cursor%3A%20text%3B%20font-family%3A%20inherit%3B%20font-size%3A%2016px%3B%20font-style%3A%20normal%3B%20font-variant%3A%20normal%3B%20font-weight%3A%20300%3B%20letter-spacing%3A%20normal%3B%20line-height%3A%201.7142%3B%20orphans%3A%202%3B%20text-align%3A%20left%3B%20text-decoration%3A%20none%3B%20text-indent%3A%200px%3B%20text-transform%3A%20none%3B%20-webkit-text-stroke-width%3A%200px%3B%20white-space%3A%20normal%3B%20word-spacing%3A%200px%3B%22%3E%3CFONT%20style%3D%22background-color%3A%20%23ffffff%3B%22%3E%3CSTRONG%3EWhen%20CPU%20%26amp%3B%20Memory%20is%20a%20constraint%20for%20high%20read-heavy%20workloads%3C%2FSTRONG%3E%20then%20Add%20a%20read%20replica.%20You%20can%20increase%20the%20performance%20by%20deploying%20read%20replicas%20and%20isolating%20read%20and%20write%20workloads.%20This%20brings%20your%20applications%20closer%20to%20the%20users%20around%20the%20world%20by%20deploying%20read%20replicas%20to%20other%20Azure%20regions.%20Add%20a%20read%20replica%20is%20ideal%20for%20read-heavy%20workloads%20including%20BI%20reporting%2C%20social%20media%2C%20web%20apps%2C%20and%20analytics.%20For%20MySQL%2C%20you%20can%20%3CA%20href%3D%22https%3A%2F%2Ftechcommunity.microsoft.com%2Ft5%2Fazure-database-for-mysql%2Fload-balance-read-replicas-using-proxysql-in-azure-database-for%2Fba-p%2F880042%22%20target%3D%22_self%22%3Eload%20balance%20read%20replicas%20using%20ProxySQL%3C%2FA%3E%20and%20also%20%3CA%20href%3D%22https%3A%2F%2Ftechcommunity.microsoft.com%2Ft5%2Fazure-database-for-mysql%2Fscaling-an-azure-database-for-mysql-workload-running-on%2Fba-p%2F1105847%22%20target%3D%22_self%22%3Escale%20your%20MySQL%20workload%20running%20on%20Kubernetes%20with%20read%20replicas%20and%20ProxySQL%3C%2FA%3E.%3C%2FFONT%3E%3C%2FSPAN%3E%3C%2FLI%3E%0A%3CLI%3E%3CSPAN%20style%3D%22display%3A%20inline%20!important%3B%20float%3A%20none%3B%20background-color%3A%20%23ffffff%3B%20color%3A%20%23333333%3B%20cursor%3A%20text%3B%20font-family%3A%20inherit%3B%20font-size%3A%2016px%3B%20font-style%3A%20normal%3B%20font-variant%3A%20normal%3B%20font-weight%3A%20300%3B%20letter-spacing%3A%20normal%3B%20line-height%3A%201.7142%3B%20orphans%3A%202%3B%20text-align%3A%20left%3B%20text-decoration%3A%20none%3B%20text-indent%3A%200px%3B%20text-transform%3A%20none%3B%20-webkit-text-stroke-width%3A%200px%3B%20white-space%3A%20normal%3B%20word-spacing%3A%200px%3B%22%3E%3CFONT%20style%3D%22background-color%3A%20%23ffffff%3B%22%3E%3CSTRONG%3EWhen%20failing%20to%20connect%20to%20the%20database%20due%20to%20no%20availability%20of%20the%20connection%3C%2FSTRONG%3E%20then%20use%20the%20recommendations%20explain%20above%20in%20connection%20tuning%20section%20and%2For%20move%20to%20higher%20SKU.%3C%2FFONT%3E%3C%2FSPAN%3E%3C%2FLI%3E%0A%3C%2FUL%3E%0A%3CP%3E%26nbsp%3B%3C%2FP%3E%0A%3CTABLE%20style%3D%22width%3A%20100%25%3B%20border-collapse%3A%20collapse%3B%22%20border%3D%221%22%3E%0A%3CTBODY%3E%0A%3CTR%3E%0A%3CTD%20style%3D%22text-align%3A%20center%3B%22%3E%3CSTRONG%3E%3CFONT%20color%3D%22%23993300%22%3EImportant!%3C%2FFONT%3E%3C%2FSTRONG%3E%3C%2FTD%3E%0A%3C%2FTR%3E%0A%3CTR%3E%0A%3CTD%20style%3D%22width%3A%20100%25%3B%20text-align%3A%20center%3B%22%3E%3CFONT%20color%3D%22%23993300%22%3EIncreasing%20vCores%2C%20Storage%2C%20and%20Memory%20is%20simple%2C%20but%20may%20not%20be%20an%20optimal%20solution.%20This%20leads%20to%20increased%20cost%20which%20might%20not%20be%20a%20good%20option%20for%20you.%20The%20reason%20for%20the%20over-utilization%20of%20resources%20could%20be%20an%20un-optimized%20database.%20As%20an%20action%20item%2C%20you%20should%20find%20slow%20queries%20and%20tune%20them.%3C%2FFONT%3E%3C%2FTD%3E%0A%3C%2FTR%3E%0A%3C%2FTBODY%3E%0A%3C%2FTABLE%3E%0A%3CP%20style%3D%22text-align%3A%20left%3B%22%3E%26nbsp%3B%3C%2FP%3E%0A%3CP%3ETo%20drill%20a%20little%20more%20in%20MySQL%20Performance%20checklist%2C%20I%20request%20you%20to%20please%20refer%20%3CA%20href%3D%22https%3A%2F%2Ftechcommunity.microsoft.com%2Ft5%2Fazure-database-for-mysql%2Fazure-database-for-mysql-performance-troubleshooting-basics%2Fba-p%2F782815%22%20target%3D%22_self%22%3EAzure%20Database%20for%20MySQL%20Performance%20Troubleshooting%20Basic%2C%3C%2FA%3E%20this%20will%20help%20you%20to%20understand%20the%20cause%20of%20the%20performance%20bottleneck%2C%20how%20to%20do%20basic%20troubleshooting%20and%20what%20options%20are%20available%20to%20fix%20it.%26nbsp%3B%3C%2FP%3E%0A%3CP%3E%26nbsp%3B%3C%2FP%3E%0A%3CP%3E%3CFONT%20style%3D%22background-color%3A%20%23ffffff%3B%22%3EIf%20you%20are%20still%20having%20a%20performance%20issue%20and%20need%20assistance%2C%20you%20have%20the%20following%20options%3A%3C%2FFONT%3E%3C%2FP%3E%0A%3CUL%3E%0A%3CLI%3E%3CFONT%20style%3D%22background-color%3A%20%23ffffff%3B%22%3EOpen%20a%20support%20incident%20with%20Microsoft%20support%20from%20azure%20portal.%3C%2FFONT%3E%3C%2FLI%3E%0A%3CLI%3E%3CFONT%20style%3D%22background-color%3A%20%23ffffff%3B%22%3EPost%20a%20question%20on%20our%20%3CA%20href%3D%22https%3A%2F%2Fsocial.msdn.microsoft.com%2FForums%2Fen-US%2Fhome%3Fforum%3DAzureDatabaseforMySQL%22%20target%3D%22_self%22%20rel%3D%22noopener%20noreferrer%20noopener%20noreferrer%22%3EMSDN%20forums%20for%20MySQL%3C%2FA%3E%3CBR%20%2F%3E%3C%2FFONT%3E%3C%2FLI%3E%0A%3CLI%3E%3CFONT%20style%3D%22background-color%3A%20%23ffffff%3B%22%3ESend%20a%20tweet%20to%20%3CA%20href%3D%22https%3A%2F%2Ftwitter.com%2FAzureDBMySQL%22%20target%3D%22_self%22%20rel%3D%22nofollow%20noopener%20noreferrer%20noopener%20noreferrer%22%3E%40AzureDBforMySQL%3C%2FA%3E%3CBR%20%2F%3E%3C%2FFONT%3E%3C%2FLI%3E%0A%3C%2FUL%3E%0A%3CP%3E%26nbsp%3B%3C%2FP%3E%0A%3CP%3E%3CFONT%20size%3D%225%22%3E%3CSTRONG%3E%3CFONT%20style%3D%22background-color%3A%20%23ffffff%3B%22%3EEnjoy%20and%20Happy%20Learning!%3C%2FFONT%3E%3C%2FSTRONG%3E%3C%2FFONT%3E%3C%2FP%3E%3C%2FLINGO-BODY%3E
Microsoft

Introduction:

Do you want to know which checklist needs to be followed when you are working with Azure Database for MySQL? Please follow the below-given information to pro-actively and re-actively make your server better. If you are facing Performance problems with Azure Database for MySQL, these can often be resolved by doing basic troubleshooting and by setting best practices in advance.

 

Optimize connection between the application and Azure Database for MySQL:

  • Physical Proximity: You can significantly increase the application throughput by creating the application server and database service in the same region. Make sure you deploy an application and the database in the same region. A quick check before starting any performance benchmarking run is to determine the network latency between the client and database using a simple SELECT 1 query. We have seen customers report significant improvement in throughput when the client and Azure Database for MySQL is in the same region.
  • Accelerated Networking: Use accelerated networking for the application server/client machine, wherever it is applicable. Accelerated Networking enables single root I/O virtualization (SR-IOV) to a VM, greatly improving its networking performance. This high-performance path bypasses the host from the datapath, reducing latency, jitter, and CPU utilization, for use with the most demanding network workloads on supported VM types. For more information please refer to create a virtual machine with accelerated networking.
  • Connecting Efficiently: Establishing a new connection is always an expensive and time-consuming task, reduce the number of attempts to create new connections by implementing the following approaches.
    • Connection Pooling: Is a mechanism that manages the creation and allocation of database connections. When a program/application requests a database connection, it prioritizes the allocation of existing idle database connections rather than creating a new one. For connection pooling, you can leverage ProxySQL, an open source, high performance proxy which provide built-in connection pooling and further allows you to scale out and load balance your workload to multiple read replicas as required on demand with any changes in application code. Alternatively, you can also leverage Heimdall Data Proxy, a vendor-neutral proprietary proxy solution. It supports query caching and read/write split with replication lag detection. You can also refer to how to accelerate MySQL Performance with the Heimdall proxy.  
    • Persistent or Long-Lived Connection: If your application has short transactions/queries typically with execution time < 5-10 ms then replace short connections with persistent connections. Replace short connections with persistent connections requires only minor changes to the code, but it has a major effect in terms of improving performance in many typical application scenarios. By using this approach you can avoid opening a new request for each connection instead reuse the existing connection to send more requests. Please make sure to set the timeout or close connection when it is done.

 

Basic Monitoring - What, How & When:

Keep a track of the resource limit by using Azure Monitor, by setting alerts on Metrics and by using an Azure Advisor. Please find below the common performance scenarios and their solutions: 

  • CPU usage consistently hitting upper limits then increase the number of cores. Also, find out resource-intensive queries using Query Performance Insights and take corrective action. Use Query Store, Query Performance Recommendation to identify queries with the longest duration, most executed. Explore opportunities to optimize.
  • Reaching maximum IOPS then increase storage provisioning to align with IOPS requirements. IOPS are dependent on storage (3 IOPS per GB). When storage hits the upper limit the server will be marked as read-only. You can configure auto grow to increase storage by 5% if you are close to limit. You can also find out costly queries using Query Performance Insights and take corrective action by implementing an Indexing strategy. Use Query Store, Performance Recommendation to identify queries with the longest duration, most executed and explore the opportunities to optimize it.
  • When there is a low cache hit ratio issue, increase memory by moving to the higher SKU of the same tier or move to memory-optimized SKU. Review your query plan and leverage the Query Performance Insights. Use Query Store, Performance Recommendation to identify queries with the longest duration, most executed. Explore opportunities to optimize.
  • When CPU & Memory is a constraint for high read-heavy workloads then Add a read replica. You can increase the performance by deploying read replicas and isolating read and write workloads. This brings your applications closer to the users around the world by deploying read replicas to other Azure regions. Add a read replica is ideal for read-heavy workloads including BI reporting, social media, web apps, and analytics. For MySQL, you can load balance read replicas using ProxySQL and also scale your MySQL workload running on Kubernetes with read replicas and ProxySQL.
  • When failing to connect to the database due to no availability of the connection then use the recommendations explain above in connection tuning section and/or move to higher SKU.

 

Important!
Increasing vCores, Storage, and Memory is simple, but may not be an optimal solution. This leads to increased cost which might not be a good option for you. The reason for the over-utilization of resources could be an un-optimized database. As an action item, you should find slow queries and tune them.

 

To drill a little more in MySQL Performance checklist, I request you to please refer Azure Database for MySQL Performance Troubleshooting Basic, this will help you to understand the cause of the performance bottleneck, how to do basic troubleshooting and what options are available to fix it. 

 

If you are still having a performance issue and need assistance, you have the following options:

 

Enjoy and Happy Learning!