| A community of more than 1,600,000 database professionals and growing |
| | Dark Reads During a Migration I caught a post from the Slack Engineering team titled: Re-architecting Slack’s Workspace Preferences: How to Move to an EAV Model to Support Scalability. In the post, an engineering intern describes the move from a blob table (actually a table storing JSON data) to an EAV table. EAV tables generally don't perform well, which isn't the same as scalability, but in the real world these two items are interrelated. I likely would have chosen a hybrid approach, using a wider table for known items, but keeping an EAV table for potential one-offs. In any case, I don't want to discuss EAV solutions. Instead I want to discuss schema migrations. That's part of the focus I have at Redgate with our Compliant Database DevOps solutions, as deploying schema changes is a challenge for many customers. It's why DBAs usually have jobs, but the traditional built-the-script-from-developer-descriptions-and-lists-of-changes doesn't always work smoothly. This creates stress for the individuals and risk for the organizations. One of the items in Slack's post is about a dark mode of deployment. That's similar to what I'd call dark launching, but the idea is the same. In this case, there's a good description of how this is helpful. In this case, there is the migration of data from one table to another. The new table was populated as part of the deployment, but rather than just using the new or old table, the application was altered to pull data from both sources and compare them. This helps to ensure the data was moved correctly. I assume issues resulted in the old data being used. There were a couple interesting things with this approach. First, instrumentation was used to measure the time spent pulling data from the new table, as a way of measuring performance. This also allowed the system to discover read/write bugs in the new process. If your system has any headroom and a decent workload, this is a great way of trying to ensure that a data migration worked. If you have a new feature, you can also use this technique. Make the database changes and add application code for your feature, but don't expose that to the user. Instead, add code that uses the feature, sending random data to the database and reading it back. In this way, you can test that your methods work and measure the load on the database. Of course, if you do this, make sure you can silently turn off the random generation if the database is negatively affected. I'm a big fan of dark launching and measuring the impact of changes. In so many cases our deployments might be delayed for any number of reasons, so the pressure to release the feature today rather than tomorrow or next week is silly. I'd argue the ability to measure impact, even for a day, will help ensure better code quality for the user. That's if you are given time to fix any issues you find.. Steve Jones from SQLServerCentral.comJoin the debate, and respond to today's editorial on the forums |
| The Voice of the DBA Podcast Listen to the MP3 Audio ( 4.1MB) podcast or subscribe to the feed at iTunes and Libsyn. The Voice of the DBA podcast features music by Everyday Jones. No relation, but I stumbled on to them and really like the music. | |
|
|
| ADVERTISEMENT | | SQL in the City Summits - New York, London & Chicago This October, Redgate are inviting those interested in learning how their business can benefit from implementing Compliant Database DevOps to attend one of our SQL in the City Summits. If you manage SQL Server databases, or manage a team of people who do so, Redgate’s SQL in the City Summit is the conference for you. Find out who’s presenting and register for a Summit near you today. Register now |
| | NEW SQL Provision: Create, protect, & manage SQL Server database copies for compliant DevOps Create and manage database copies effortless and keeps compliance central to the process. With SQL Provisions virtual cloning technology, databases can be created in seconds using just MB of storage, enabling business to move faster. Sensitive data can be anonymized or replaced with realistic data to ensure data is protected as it moves between environments. Download your free trial |
|
|
|
| | | Andy Robertson from SQLServerCentral.com Default constraints can lead to assumptions about the values in a column. Combine a check constraint to avoid slip ups. More » |
| If your SQL Server runs out of disk space, and it is running a database for an enterprise’s trading application, then the company can’t take money until the DBA fixes the problem. In this article Tony Davis shows you how to avoid this scenario using SQL Monitor. More » |
| Additional Articles from MSSQLTips.com In this tip we look at different examples of how to use the LIKE operator to get the correct results when strings contain wildcard characters. We will also look a function to make this easier to do. More » |
| er.mr.lehkara from SQLServerCentral Blogs Somewhere on internet i found this question. Thought to share it with you all. We have two tables, school_students and Class_student. ... More » |
| James Serra from SQLServerCentral Blogs Read Scale-Out is a little-known feature that allows you to load balance Azure SQL Database read-only workloads using the capacity of... More » |
|
|
| | Today's Question (by Steve Jones): What happens with this code? DECLARE @d DATETIMEOFFSET , @c VARCHAR(50) ; SELECT @d = '20180903 11:55:34 -7' ; SELECT @c = @d ; SELECT @c AS 'TheDate' ; |
Think you know the answer? Click here, and find out if you are right. We keep track of your score to give you bragging rights against your peers. This question is worth 1 point in this category: Date Manipulation. We'd love to give you credit for your own question and answer. To submit a QOTD, simply log in to the Contribution Center. |
|
|
| |
ADVERTISEMENT | The company's new IT initiative, code named Phoenix Project, is critical to the future of Parts Unlimited, but the project is massively over budget and very late. The CEO wants Bill to report directly to him and fix the mess in ninety days or else Bill's entire department will be outsourced. Get your copy from Amazon today. | | |
|
|
|
|
|
| Yesterday's Question of the Day |
| Yesterday's Question (by Steve Jones): I have installed SQL Server 2017 RTM on Linux. I am creating a new login for a client. What are my password policy options? Answer: Only MUST_CHANGE Explanation: The only option on Linux for SQL Server 2017 is MUST_CHANGE. Ref: Security limitations for SQL Server on Linux - click here » Discuss this question and answer on the forums |
|
|
| Database Pros Who Need Your Help |
| Here's a few of the new posts today on the forums. To see more, visit the forums. A question Regarding SQL SERVER 2017 read and write routing to secondary replica. - HI All, I have a question regarding Alwayson primary and secondary replica and if/how can I load balance the read and... Dissertation theme in MS SQL Server for a DBA - In this forum I want to ask a question like this. I know it does not actually touch problems in... Rewrite query - Hi, Is there another way of writing this query without first having to get the MAX date for an id and... View - failed because it contains a derived or constant field. - I have this View: Create View xyz As Select Value, MAX(Case When Other = 'Color' Then Description Else '' End) Color, MAX(Case When Other = 'Font' Then... Selecting Min of multiple values, including an operation - Hi All, It's been a while, but would like to tap on your expertise. I've been trying to figure out the below query,... Can db_ddladmin role permissions be limited to specific tables on a schema? - We are running SQL Server 2012 SP3 on Windows 2008 Server. Members of the db_ddladmin fixed database role can run any Data Definition... Unused Indexes - Dear Experts, I generated a list of unused indexes from my database by equating Last Security Patch - Dear Experts, Can anybody help me know how to check what the last security patch was applied to our SQL Server... How to substract Balance Of Customer from amount Due for Invoice and collect result on one query - Problem How to make query Substract AmountDue For Invoice from Customer Balance Balance Customer query : SELECT VTargetDetail.BranchCode ,VTargetDetail.SubLdgCode as UnitCode ,(SUM(dbo.VTargetDetail.Debit... Filtering data based on dynamic date. - Create table #TEMP ( ID INT ) Create table #TEMP1 ( ID INT, Letter_Type VARCHAR(100), Letter_Sent_Date DATE ) INSERT INTO #TEMP VALUES (1),(2),(3),(4) GO INSERT INTO #TEMP1 VALUES (1,'A','01/01/2017'), (1,'B','01/0 Query to find rows which has replacement character as part of a column string - Hi All, I have a column in my oracle SQL table where user will city name from the online application. But sometimes... How do I write a record for each day in a date range??? - Hi To make it simple I have a @StartDate and @EndDate I choose students with an admit date in that range from the... |
|
| This email has been sent to newsletter@newslettercollector.com. To be removed from this list, please click here. If you have any problems leaving the list, please contact the webmaster@sqlservercentral.com. | This newsletter was sent to you because you signed up at SQLServerCentral.com. Feel free to forward this to any colleagues that you think might be interested. If you have received this email from a colleague, you can register to receive it here. | This transmission is ©2018 Redgate Software Ltd, Newnham House, Cambridge Business Park, Cambridge, CB4 0WZ, United Kingdom. All rights reserved. Contact: webmaster@sqlservercentral.com |
|
|