Optimizing a Terabyte-Scale Azure SQL Database by info.odysseyx@gmail.com September 7, 2024 written by info.odysseyx@gmail.com September 7, 2024 0 comment 11 views 11 Question Description:A customer designed a database schema for a terabyte-scale Azure SQL database, but the original design did not include a unique key. As data volumes grow, performance issues become more severe. To address these performance issues, Azure SQL uses hidden indexes that use unique identifiers, which have a maximum limit of 2,147,483,648. If the number of data rows in the table exceeds 2.1 billion, performing an insert or update operation will result in the following error: Message 666, Level 16, State 2, Line 25 These errors can lead to partial or complete database outage, which can have a serious impact on business operations. Mitigation strategies: 1. Quick solution: Specify ONLINE=ON and RESUMABLE=ON to make the index creation online and resumable. This allows the operation to use smaller transactions, so that if it fails for any reason, it can be resumed from the point of failure. 2. Permanent fixes: Rebuild the clustered index with a unique key by adding a new column. Here are the steps: References Unique identifier How to design a clustered index Create a clustered index Source link Share 0 FacebookTwitterPinterestEmail info.odysseyx@gmail.com previous post Exciting Java Web Developer Job Opportunities in Noida – Freshersworld Client Hiring Now next post Join Resolin Technology in Jorhat: Exciting HR and Operations Manager Positions Now Open You may also like 7 Disturbing Tech Trends of 2024 December 19, 2024 AI on phones fails to impress Apple, Samsung users: Survey December 18, 2024 Standout technology products of 2024 December 16, 2024 Is Intel Equivalent to Tech Industry 2024 NY Giant? December 12, 2024 Google’s Willow chip marks breakthrough in quantum computing December 11, 2024 Job seekers are targeted in mobile phishing campaigns December 10, 2024 Leave a Comment Cancel Reply Save my name, email, and website in this browser for the next time I comment.