<?xml version="1.0" encoding="UTF-8" ?>
<?xml-stylesheet type="text/xsl" href="http://sqlblog.com/utility/FeedStylesheets/rss.xsl" media="screen"?><rss version="2.0" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:slash="http://purl.org/rss/1.0/modules/slash/" xmlns:wfw="http://wellformedweb.org/CommentAPI/"><channel><title>Andy Leonard : scalable</title><link>http://sqlblog.com/blogs/andy_leonard/archive/tags/scalable/default.aspx</link><description>Tags: scalable</description><dc:language>en</dc:language><generator>CommunityServer 2.1 SP2 (Build: 61129.1)</generator><item><title>Twitter Woes</title><link>http://sqlblog.com/blogs/andy_leonard/archive/2008/05/30/twitter-woes.aspx</link><pubDate>Fri, 30 May 2008 13:42:00 GMT</pubDate><guid isPermaLink="false">21093a07-8b3d-42db-8cbf-3350fcbf5496:7061</guid><dc:creator>andyleonard</dc:creator><slash:comments>4</slash:comments><comments>http://sqlblog.com/blogs/andy_leonard/comments/7061.aspx</comments><wfw:commentRss>http://sqlblog.com/blogs/andy_leonard/commentrss.aspx?PostID=7061</wfw:commentRss><description>&lt;P&gt;"My name is Andy Leonard. I tweet."&lt;/P&gt;
&lt;P&gt;&lt;EM&gt;"Hi Andy, we love you."&lt;/EM&gt;&lt;/P&gt;
&lt;P&gt;It's true, I am a bona fide &lt;A class="" href="http://www.twitter.com/AndyLeonard" target=_blank&gt;Twitter&lt;/A&gt;-holic. If you use the service you may have noticed disruptions lately. &lt;A class="" href="http://franksworld.com/blog/archive/2008/05/30/10959.aspx" target=_blank&gt;Frank La Vigne&lt;/A&gt; (recently married - congratulations Frank!)&amp;nbsp;blogged about it. The &lt;A class="" href="http://dev.twitter.com/2008/05/youve-got-qs-weve-got-as.html" target=_blank&gt;Twitter developers&lt;/A&gt; are blogging about it. And they have raised the ire of &lt;A class="" href="http://friendfeed.com/e/5e082de5-9d6f-a933-b47e-fdd2f19d82fb" target=_blank&gt;Mr. Scoble&lt;/A&gt;, who posted his feelings on the matter at &lt;A class="" href="http://friendfeed.com/" target=_blank&gt;FriendFeed&lt;/A&gt; - a competing service (if "competing" applies here...).&lt;/P&gt;
&lt;P&gt;From the &lt;A class="" href="http://dev.twitter.com/2008/05/youve-got-qs-weve-got-as.html" target=_blank&gt;Twitter Dev&lt;/A&gt; blog:&lt;/P&gt;
&lt;P&gt;&lt;EM&gt;The events that hit our system the hardest are generally when "popular" users - that is, users with large numbers of followers and people they're following - perform a number of actions in rapid succession. This usually results in a number of big queries that pile up in our database(s). Not running scripts to follow thousands of users at a time would be a help, but that's behavior we have to limit on our side.&lt;/EM&gt;&lt;/P&gt;
&lt;P&gt;The Twitter Dev comments have been interpreted by &lt;A class="" href="http://venturebeat.com/2008/05/29/twitter-dont-blame-ruby-blame-scoble/" target=_blank&gt;some&lt;/A&gt; as complaining about user load. This is not good for Twitter and they should take immediate steps to manage the buzz before this goes any farther.&lt;/P&gt;
&lt;P&gt;I jokingly tell clients sometimes the problem with their application or database performance is a combination of their data and their clients. I only do this in person and after reaching a comfortable comfort level with the client, and even then it's sarcasm that I carefully throw out. Why? It's the technological equivalent of saying the word "bomb" while waiting in the security line at the airport - within earshot of the good people of the TSA.&lt;/P&gt;
&lt;P&gt;In other words, it's a really dumb thing to say.&lt;/P&gt;
&lt;P&gt;Let's look at why: First, Twitter is demonstrating that they made a mistake in architecture. I don't know what that mistake is, but it's obvious to everyone using or attempting to use the platform that an error has occurred. It's not the HTTP 500 error I saw last night or the on-again-off-again link to older tweets. It goes beyond that back to the design.&lt;/P&gt;
&lt;P&gt;Part of the problem can be stated thus: "Twitter did not know we were going to grow so fast." Another way to say that is "Twitter doesn't scale."&lt;/P&gt;
&lt;P&gt;As a database professional in the data warehousing field, I feel Twitter's pain. &lt;/P&gt;
&lt;P&gt;We are often pressured to "just make it go!" - deliver something now and fix it later. And oh the temptation is strong, the logic sounds sound, the song so sweet... "you can circle around later and fix it" they say. When you hear these words and are so tempted you can be certain of one and only one thing: the person saying this to you is lying. Malice may or may not be present - they may simply be repeating what they heard or they may be utterly ignorant, but they speak not the truth.&lt;/P&gt;
&lt;P&gt;Second - although&amp;nbsp;I could be wrong about this -&amp;nbsp;I would wager good money that Twitter &lt;A class="" href="http://vsteamsystemcentral.com/cs/blogs/applied_team_system/archive/2006/07/30/114.aspx" target=_blank&gt;doesn't need a DBA&lt;/A&gt;. I've seen / heard / experienced this before. They have a talented team of application developers who have built large applications in the past and never once paid a database professional. Look at the money they've saved! &amp;lt;/sarcasm&amp;gt;&lt;/P&gt;
&lt;P&gt;Why does this happen? Experienced database professionals slow down project development. We get in the way. We muck about with stress tests and bulky architectures and referential integrity and schemas and the like. Who needs us? We're an unnecessary expense.&lt;/P&gt;
&lt;P&gt;Or are we?&lt;/P&gt;
&lt;P&gt;From the quote above, the bottleneck is occuring in the database. It's those pesky queries. And the users causing them to be executed. It's &amp;lt;insert-your-favorite-excuse-here&amp;gt; - everyone and everything, except the designers and architects who built a non-scaling solution.&lt;/P&gt;
&lt;P&gt;My lovely bride Christy has this saying: "Good judgment comes from experience, and experience comes from bad judgment." My hope is Twitter will discontinue offering excuses and blaming users, and instead fix the (apparently database-scaling-related) problem.&lt;/P&gt;
&lt;P&gt;If this comes across as harsh, that is not my intention. I have been there and done that myself. These are learning experiences and growth opportunities. Hopefully Twitter will enjoy the fruits of this learning and growth in the future.&lt;/P&gt;
&lt;P&gt;For now, I've created a &lt;A class="" href="http://friendfeed.com/andyleonard" target=_blank&gt;FriendFeed&lt;/A&gt; account. Let's see how they scale...&lt;/P&gt;
&lt;P&gt;:{&amp;gt; Andy&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;img src="http://sqlblog.com/aggbug.aspx?PostID=7061" width="1" height="1"&gt;</description><category domain="http://sqlblog.com/blogs/andy_leonard/archive/tags/DBA/default.aspx">DBA</category><category domain="http://sqlblog.com/blogs/andy_leonard/archive/tags/scalable/default.aspx">scalable</category><category domain="http://sqlblog.com/blogs/andy_leonard/archive/tags/quality/default.aspx">quality</category><category domain="http://sqlblog.com/blogs/andy_leonard/archive/tags/database+design/default.aspx">database design</category><category domain="http://sqlblog.com/blogs/andy_leonard/archive/tags/Database+Testing/default.aspx">Database Testing</category><category domain="http://sqlblog.com/blogs/andy_leonard/archive/tags/Support/default.aspx">Support</category></item><item><title>Context and Grain</title><link>http://sqlblog.com/blogs/andy_leonard/archive/2007/11/03/learning-ssis.aspx</link><pubDate>Sun, 04 Nov 2007 00:41:00 GMT</pubDate><guid isPermaLink="false">21093a07-8b3d-42db-8cbf-3350fcbf5496:3207</guid><dc:creator>andyleonard</dc:creator><slash:comments>0</slash:comments><comments>http://sqlblog.com/blogs/andy_leonard/comments/3207.aspx</comments><wfw:commentRss>http://sqlblog.com/blogs/andy_leonard/commentrss.aspx?PostID=3207</wfw:commentRss><description>&lt;P&gt;&lt;STRONG&gt;Introduction: The World Series (1979) and Photography&lt;/STRONG&gt;&lt;/P&gt;
&lt;P&gt;&lt;A class="" title="Willie Stargell" href="http://en.wikipedia.org/wiki/Willie_Stargell" target=_blank&gt;Willie "Pops" Stargell&lt;/A&gt; started my interest in photography (...a funny way to start a post on a SQL Server blog site, but bear with me). Pops Stargell led the 1979 Pittsburgh Pirates to win the World Series. He was the MVP that year as well.&lt;/P&gt;
&lt;P&gt;My Mom, in the only time I ever remember her gambling when I was a kid, bought a $10 spot in a World Series baseball pool that year. The pool was based on the 1's digit of the total runs scored by the Pirates and Orioles in the entire series with the person who had the 1's digits in the correct order winning $600, the person getting them in reverse order winning $300, and the organizer kept $100. The series lasted seven games that year. Mom was set to win the $600 if the final score of Game 7 was 4-1 in the Pirate's favor. Willie Stargell hit a home run that helped achieve that score, along with some good fielding (especially for a 39-year old player).&lt;/P&gt;
&lt;P&gt;I had a budding interest in photography because some friends at high school were photographers.&amp;nbsp;There was just no way we could swing $200 for a mid-range 35mm SLR back them. But Mom promised me if&amp;nbsp;she won the big money she'd buy me the camera. She won and she bought me the camera.&lt;/P&gt;
&lt;P&gt;I got to attend an interesting Yearbook Seminar the next summer held at Longwood University&amp;nbsp;in Farmville, VA - located about&amp;nbsp;7 miles from where I currently live. I learned some fascinating things about photography and did a decent job getting shots for my senior year yearbook. &lt;/P&gt;
&lt;P&gt;&lt;STRONG&gt;Photography Context and Grain&lt;/STRONG&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;One of the things I learned was this: If you take an out-of-focus shot, there's nothing you can do in chemical and light processing to bring that shot into focus. There may be (and probably are) digital things we can do nowadays, but this was the 70's. The very best you could do with an out-of-focus was produce a print no less in focus. &lt;/P&gt;
&lt;P&gt;In the context of the photograph, the focus attribute was set when the picture was taken. The focus could not be improved after the picture was taken. It was the best it was ever going to be from that moment until forever. &lt;/P&gt;
&lt;P&gt;&lt;STRONG&gt;Database Design Context and Grain&lt;/STRONG&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Now here's a lesson we can take into database development. &lt;/P&gt;
&lt;P&gt;Several for-instances leap to mind: granular resolution in a business intelligence data acquisition system, for one. &lt;/P&gt;
&lt;P&gt;Imagine you are tasked with reporting real-time data for a business intelligence scorecard application. The client expects up-to-the-second updates from the data acquisition systems on the manufacturing floor and this is a project requirement. &lt;/P&gt;
&lt;P&gt;Sure, you can do that.&lt;/P&gt;
&lt;P&gt;Unless data is collected every five seconds on the floor. Then you have an issue. There's nothing you can do from your side of the project - since you merely read, store, transform, and display the acquired data - to "fix" this. You can give updates every second, but these counters (and metrics derived from them) will change only every five seconds. &lt;/P&gt;
&lt;P&gt;In this imaginary scenario you cannot "re-focus" the picture. The best you can do is present the information at it's current grain - and no finer. &lt;/P&gt;
&lt;P&gt;&lt;STRONG&gt;Software Development Context and Grain&lt;/STRONG&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;The same&amp;nbsp;can be said&amp;nbsp;for software development. I will state it in another way: Every decision to develop &lt;EM&gt;Feature A&lt;/EM&gt; in a certain way is also a decision to &lt;EM&gt;not&lt;/EM&gt; develop &lt;EM&gt;Feature A&lt;/EM&gt; in any number of other ways.&lt;/P&gt;
&lt;P&gt;There are consequences to choosing an approach, methodology, or context. These consequences are usually discovered well down the path towards a deliverable or release. Occassionally, talented developers can find a "silver bullet" - a fix that solves the current consequence to a past decision without breaking anything else. But this is unfortunately rare. Usually there are consequences to the consequence-initiated fix, and so on, &lt;EM&gt;ad infinitum&lt;/EM&gt;. &lt;/P&gt;
&lt;P&gt;There is a point early on in a development project where such consequences, if detected, can be addressed with relatively little effort. I use the analogy of deflecting an approaching asteroid: If you detect it early enough you can deflect it with a BB. Wait, and all the nukes on the planet won't stop it.&lt;/P&gt;
&lt;P&gt;One rule of processes - I first saw this in &lt;A class="" title="The Goal" href="http://www.amazon.com/Goal-Eliyahu-Goldratt/dp/0884271781/" target=_blank&gt;The Goal&lt;/A&gt; - is "Losses accumulate, gains do not" (just call me Mr. Encouraging). Most good process measurement methodologies account for this. One way to think about it is to consider the example of a three-stage linear process where each stage is running at 90% efficiency. &lt;/P&gt;
&lt;P&gt;&amp;lt;TrickQuestion&amp;gt; What is the overall efficiency of the system?&lt;BR&gt;&amp;nbsp; &amp;lt;TrickAnswer&amp;gt; 90%&amp;lt;/TrickAnswer&amp;gt;&lt;BR&gt;&amp;lt;/TrickQuestion&amp;gt;&lt;/P&gt;
&lt;P&gt;90% is incorrect. It's a linear process. The output of stage 1 is 90%. The output of stage 2 is 90% of 90%, or 81%. The output of stage 3 is 90% of 81%, or 73%. &lt;/P&gt;
&lt;P&gt;Consider a process-improvement initiative that results in 100% efficiency at stage 1. The output improves, but only to 81%. Consider the alternative - a reduction at stage 1 to 80%. Stage 2's output becomes 72%; stage 3's: 65%. The losses accumulate, the gains don't. To quote &lt;A class="" title="Foghorn Leghorn" href="http://en.wikipedia.org/wiki/Foghorn_Leghorn" target=_blank&gt;Foghorn Leghorn&lt;/A&gt;, "Figures don't lie."&lt;/P&gt;
&lt;P&gt;&lt;STRONG&gt;Why Are You Sharing This, Mr. Encouraging?&lt;/STRONG&gt;&lt;/P&gt;
&lt;P&gt;There are a&amp;nbsp;few reasons: First, this is a trap into which many a young developer falls. It looks simple but it is not. Life is filled with things that appear deceptively simple. Software development is but one of them.&lt;/P&gt;
&lt;P&gt;Second, underestimating the effort required to accomplish any software related task is a trait shared by every good developer I know, plus me. We all think things will take less time than they do. I don't know why, but that doesn't make the fact any less true. &lt;A class="" title="Joel Spolsky" href="http://www.joelonsoftware.com/" target=_blank&gt;Joel Spolsky&lt;/A&gt; has an excellent article on &lt;A class="" title=EBS href="http://www.joelonsoftware.com/items/2007/10/26.html" target=_blank&gt;Evidence Based Scheduling&lt;/A&gt; that presents an interesting solution to this.&lt;/P&gt;
&lt;P&gt;Third, it doesn't matter how good you are, this can happen to you. The odds of getting caught in a process-resolution trap increase exponentially with complexity. &lt;/P&gt;
&lt;P&gt;&lt;STRONG&gt;Conclusion&lt;/STRONG&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Be aware during design / architecture phases,&amp;nbsp;the decisions made today will limit future options. There's a side order of art included with the science here. Balance is the key.&lt;/P&gt;
&lt;P&gt;:{&amp;gt; Andy&lt;/P&gt;&lt;img src="http://sqlblog.com/aggbug.aspx?PostID=3207" width="1" height="1"&gt;</description><category domain="http://sqlblog.com/blogs/andy_leonard/archive/tags/scalable/default.aspx">scalable</category><category domain="http://sqlblog.com/blogs/andy_leonard/archive/tags/quality/default.aspx">quality</category><category domain="http://sqlblog.com/blogs/andy_leonard/archive/tags/database+design/default.aspx">database design</category><category domain="http://sqlblog.com/blogs/andy_leonard/archive/tags/software+developers/default.aspx">software developers</category><category domain="http://sqlblog.com/blogs/andy_leonard/archive/tags/SQL+Server/default.aspx">SQL Server</category><category domain="http://sqlblog.com/blogs/andy_leonard/archive/tags/database+developers/default.aspx">database developers</category><category domain="http://sqlblog.com/blogs/andy_leonard/archive/tags/measurement/default.aspx">measurement</category></item><item><title>Everything Scales</title><link>http://sqlblog.com/blogs/andy_leonard/archive/2007/08/19/everything-scales.aspx</link><pubDate>Sun, 19 Aug 2007 12:51:00 GMT</pubDate><guid isPermaLink="false">21093a07-8b3d-42db-8cbf-3350fcbf5496:2238</guid><dc:creator>andyleonard</dc:creator><slash:comments>0</slash:comments><comments>http://sqlblog.com/blogs/andy_leonard/comments/2238.aspx</comments><wfw:commentRss>http://sqlblog.com/blogs/andy_leonard/commentrss.aspx?PostID=2238</wfw:commentRss><description>&lt;FONT face=verdana color=navy&gt;The tune to a &lt;A href="http://en.wikipedia.org/wiki/Bush_%28band%29"&gt;Bush&lt;/A&gt; song is running through my head as I type this... the band, not the president - although imagining the &lt;A href="http://www.whitehouse.gov/president/"&gt;President&lt;/A&gt; &lt;EM&gt;singing&lt;/EM&gt; the song is an interesting brain-stretch. 
&lt;P&gt;It's a fact of IT life that everything scales. Some successfully, even. Problems start when things do not scale successfully (or well). It happens in business. It happens with software systems. &lt;/P&gt;
&lt;P&gt;When it happens with businesses, you hear things like "They grew too fast." When it happens with software systems, you browse to a website and receive an HTTP 500 or 404 error.&lt;/P&gt;
&lt;P&gt;Can this be avoided (in business or software)? I think that's an excellent question - one well worth examining.&lt;/P&gt;
&lt;HR&gt;

&lt;P&gt;The answer, I believe, lies with how predictable the scalability is.&lt;/P&gt;
&lt;P&gt;Consider a database application: If you know which tables are going to grow, how, and how much, you can plan for said growth. How would you plan? You could partition the tables using one or a combination of partitioning techniques. You could appropriate filegroups, snapshots, and a host of other functionality. If you only you &lt;EM&gt;knew&lt;/EM&gt; where to apply these techniques.&lt;/P&gt;
&lt;P&gt;That's the key.&lt;/P&gt;
&lt;HR&gt;

&lt;P&gt;Achieving scalability starts with capturing metrics. If you know how your database is growing from the beginning - if you can chart the growth of individual tables, access patterns, and internal performance data - you can predict growth and manage scalability.&lt;/P&gt;
&lt;P&gt;So the key is measurement.&lt;/P&gt;
&lt;P&gt;Measurement is an engineering discipline in its own right. The field of applied measurement is called Instrumentation. Applying measurement to a process is referred to as "instrumenting the process."&lt;/P&gt;
&lt;P&gt;How do you instrument a database process? Iteration 1 would include creating an internal table to house and maintain process metadata: &lt;/P&gt;&lt;FONT face="courier new" color=black&gt;
&lt;P&gt;CREATE TABLE dbo.ProcessData &lt;BR&gt;(ProcessDataID int IDENTITY(1,1) NOT NULL, &lt;BR&gt;ProcessDataDateTime datetime NULL CONSTRAINT DF_ProcessDataDateTime DEFAULT (getdate()), &lt;BR&gt;ProcessDataIndicatorName varchar(50) NULL, &lt;BR&gt;ProcessDataIndicatorValue varchar(50) NULL, &lt;BR&gt;ProcessDataIndicatorStatus char(1) NULL CONSTRAINT DF_ProcessDataIndicatorStatus DEFAULT ('C'), &lt;BR&gt;CONSTRAINT PK_ProcessData PRIMARY KEY CLUSTERED (ProcessDataID) &lt;/P&gt;&lt;/FONT&gt;
&lt;P&gt;If your instrumented process is stored-procedure-based, you could add INSERT statements to your existing stored procedures. Consider instrumenting a parent stored procedure that calls child stored procedures. The instrumented proc could look like the following (instrumentation emphasized):&lt;/P&gt;&lt;FONT face="courier new" color=black&gt;
&lt;P&gt;CREATE PROCEDURE dbo.SomeProcess &lt;BR&gt;AS &lt;BR&gt;&lt;BR&gt;begin &lt;BR&gt;&lt;BR&gt;&lt;EM&gt;INSERT INTO dbo.ProcessData &lt;BR&gt;(ProcessDataIndicatorName, &lt;BR&gt;ProcessDataIndicatorValue) &lt;BR&gt;VALUES('ChildProc1','Starting');&lt;/EM&gt; &lt;BR&gt;&lt;BR&gt;EXEC dbo.ChildProc1 &lt;BR&gt;&lt;BR&gt;&lt;EM&gt;INSERT INTO dbo.ProcessData &lt;BR&gt;(ProcessDataIndicatorName, &lt;BR&gt;ProcessDataIndicatorValue) &lt;BR&gt;VALUES('ChildProc1','Ending'); &lt;BR&gt;&lt;BR&gt;INSERT INTO dbo.ProcessData &lt;BR&gt;(ProcessDataIndicatorName, &lt;BR&gt;ProcessDataIndicatorValue) &lt;BR&gt;('ChildProc2','Starting');&lt;/EM&gt; &lt;BR&gt;&lt;BR&gt;EXEC dbo.ChildProc2 &lt;BR&gt;&lt;BR&gt;&lt;EM&gt;INSERT INTO dbo.ProcessData &lt;BR&gt;(ProcessDataIndicatorName, &lt;BR&gt;ProcessDataIndicatorValue) &lt;BR&gt;VALUES('ChildProc2','Ending'); &lt;BR&gt;&lt;BR&gt;INSERT INTO dbo.ProcessData &lt;BR&gt;(ProcessDataIndicatorName, &lt;BR&gt;ProcessDataIndicatorValue) &lt;BR&gt;('ChildProc3','Starting');&lt;/EM&gt; &lt;BR&gt;&lt;BR&gt;EXEC dbo.ChildProc3 &lt;BR&gt;&lt;BR&gt;&lt;EM&gt;INSERT INTO dbo.ProcessData &lt;BR&gt;(ProcessDataIndicatorName, &lt;BR&gt;ProcessDataIndicatorValue) &lt;BR&gt;VALUES('ChildProc3','Ending');&lt;/EM&gt; &lt;BR&gt;&lt;BR&gt;end &lt;/P&gt;&lt;/FONT&gt;
&lt;P&gt;Before moving forward, removing code duplication would be a worthwhile effort. In application development, this is one of many processes generally referred to as Refactoring.&lt;/P&gt;
&lt;P&gt;The INSERT statements are a prime candidate for refactoring and we can address this with a stored procedure:&lt;/P&gt;&lt;FONT face="courier new" color=black&gt;
&lt;P&gt;CREATE PROCEDURE dbo.AddProcessData &lt;BR&gt;@ProcessDataIndicatorName varchar(50), &lt;BR&gt;@ProcessDataIndicatorValue varchar(50) &lt;BR&gt;AS &lt;BR&gt;&lt;BR&gt;begin &lt;BR&gt;&lt;BR&gt;INSERT INTO dbo.ProcessData &lt;BR&gt;(ProcessDataIndicatorName, ProcessDataIndicatorValue) &lt;BR&gt;VALUES(@ProcessDataIndicatorName, @ProcessDataIndicatorValue); &lt;BR&gt;&lt;BR&gt;end &lt;/P&gt;&lt;/FONT&gt;
&lt;P&gt;Now the parent stored procedure instrumentation above can be modified to look like this:&lt;/P&gt;&lt;FONT face="courier new" color=black&gt;
&lt;P&gt;CREATE PROCEDURE dbo.SomeProcess &lt;BR&gt;AS &lt;BR&gt;&lt;BR&gt;begin &lt;BR&gt;&lt;BR&gt;&lt;EM&gt;EXEC dbo.AddProcessData @ProcessDataIndicatorName='ChildProc1', @ProcessDataIndicatorValue='Starting';&lt;/EM&gt; &lt;BR&gt;&lt;BR&gt;EXEC dbo.ChildProc1 &lt;BR&gt;&lt;BR&gt;&lt;EM&gt;EXEC dbo.AddProcessData @ProcessDataIndicatorName='ChildProc1', @ProcessDataIndicatorValue='Ending'; &lt;BR&gt;&lt;BR&gt;EXEC dbo.AddProcessData @ProcessDataIndicatorName='ChildProc2', @ProcessDataIndicatorValue='Starting';&lt;/EM&gt; &lt;BR&gt;&lt;BR&gt;EXEC dbo.ChildProc2 &lt;BR&gt;&lt;BR&gt;&lt;EM&gt;EXEC dbo.AddProcessData @ProcessDataIndicatorName='ChildProc2', @ProcessDataIndicatorValue='Ending'; &lt;BR&gt;&lt;BR&gt;EXEC dbo.AddProcessData @ProcessDataIndicatorName='ChildProc3', @ProcessDataIndicatorValue='Starting';&lt;/EM&gt; &lt;BR&gt;&lt;BR&gt;EXEC dbo.ChildProc3 &lt;BR&gt;&lt;BR&gt;&lt;EM&gt;EXEC dbo.AddProcessData @ProcessDataIndicatorName='ChildProc3', @ProcessDataIndicatorValue='Ending';&lt;/EM&gt; &lt;BR&gt;&lt;BR&gt;end &lt;/P&gt;&lt;/FONT&gt;
&lt;P&gt;Much better.&lt;/P&gt;
&lt;P&gt;Measuring the current process provides a baseline - the first step in a continuous improvement process that will provides dynamic design changes, performance monitoring, and - eventually - a dynamically-scalable system. It also supplies the current performance status against which we can benchmark future improvements and modification. &lt;/P&gt;
&lt;P&gt;:{&amp;gt; Andy&lt;/P&gt;&lt;/FONT&gt;&lt;img src="http://sqlblog.com/aggbug.aspx?PostID=2238" width="1" height="1"&gt;</description><category domain="http://sqlblog.com/blogs/andy_leonard/archive/tags/Incremental/default.aspx">Incremental</category><category domain="http://sqlblog.com/blogs/andy_leonard/archive/tags/Database+Developer/default.aspx">Database Developer</category><category domain="http://sqlblog.com/blogs/andy_leonard/archive/tags/scalable/default.aspx">scalable</category><category domain="http://sqlblog.com/blogs/andy_leonard/archive/tags/measurement/default.aspx">measurement</category></item><item><title>Database Professionals: An Enterprise Requirement</title><link>http://sqlblog.com/blogs/andy_leonard/archive/2007/07/12/database-professionals-an-enterprise-requirement.aspx</link><pubDate>Fri, 13 Jul 2007 01:53:00 GMT</pubDate><guid isPermaLink="false">21093a07-8b3d-42db-8cbf-3350fcbf5496:1686</guid><dc:creator>andyleonard</dc:creator><slash:comments>13</slash:comments><comments>http://sqlblog.com/blogs/andy_leonard/comments/1686.aspx</comments><wfw:commentRss>http://sqlblog.com/blogs/andy_leonard/commentrss.aspx?PostID=1686</wfw:commentRss><description>&lt;P&gt;&lt;FONT face=Verdana color=#000080&gt;A friend (who shall remain nameless) recently told me his company interviewed a competent database developer and DBA. All seemed in agreement an offer would be forthcoming until the very end of the recruiting process. At that time, someone made the comment "we don't need a DBA."&lt;/FONT&gt;&lt;/P&gt;
&lt;P&gt;&lt;FONT face=Verdana color=#000080&gt;It would be notable if this sentiment wasn't&amp;nbsp;so widespread - but I see it often. How often? Well, I would have to tell you how I see it to qualify that statement:&lt;/FONT&gt;&lt;/P&gt;
&lt;P&gt;&lt;FONT face=Verdana color=#000080&gt;You see, people rarely say to me "We don't need&amp;nbsp;a DBA." Mostly I see it in their applications - many of them prominent companies in which you may even own stock. I can tell when I examine their schema. I can see it when I execute Profiler against their SQL Server database. &lt;/FONT&gt;&lt;/P&gt;
&lt;P&gt;&lt;FONT face=Verdana color=#000080&gt;Now, there are lots of reasons to design a denormalized schema. And there are lots of reasons to&amp;nbsp;encapsulate the business rules in code. This is not what I'm talking about -&amp;nbsp;though some of these systems would clearly perform better (or at all, in extreme cases) if they took advantage of better design patterns.&lt;/FONT&gt;&lt;/P&gt;
&lt;P&gt;&lt;FONT face=Verdana color=#000080&gt;I'm talking about designs where this much is obvious:&lt;/FONT&gt;&lt;/P&gt;
&lt;P&gt;&lt;FONT face=Verdana color=#000080&gt;1. At least two people designed the data layer; and&lt;/FONT&gt;&lt;BR&gt;&lt;FONT face=Verdana color=#000080&gt;2. They did not communicate during the process.&lt;/FONT&gt;&lt;/P&gt;
&lt;P&gt;&lt;FONT face=Verdana color=#000080&gt;Often, enterprise-level database design is shoveled onto developers as a secondary task. No, I'm not making this up - it's too tragic to joke about. There are developers&amp;nbsp;who can handle this task. But there are more who &lt;EM&gt;believe&lt;/EM&gt; they are database developers than actually are. (Before I became a SQL Server DBA I was a developer who &lt;EM&gt;thought&lt;/EM&gt; I was a SQL Server DBA...)&lt;/FONT&gt;&lt;/P&gt;
&lt;P&gt;&lt;FONT face=Verdana color=#000080&gt;There will doubtless be readers who can provide examples of how their&amp;nbsp;enterprise application&amp;nbsp;was built by junior developers who did the database and code work and whose systems are performing just fine. I'm happy for you and sincerely hope the system scales.&amp;nbsp;&lt;/FONT&gt;&lt;/P&gt;
&lt;P&gt;&lt;FONT face=Verdana color=#000080&gt;Designing a scalable solution&amp;nbsp; - database, application, or enterprise architecture - is one of those things that consumes time, thinking, resources, and money during the early phases of an enterprise development cycle. But it is - hands down -&amp;nbsp;one of the best investments (if not &lt;EM&gt;the&lt;/EM&gt; best) in the solution. &lt;/FONT&gt;&lt;/P&gt;
&lt;P&gt;&lt;FONT face=Verdana color=#000080&gt;In today's market, scalability is&amp;nbsp;as optional as security. And l&lt;/FONT&gt;&lt;FONT face=Verdana color=#000080&gt;ike security, a scalable design&amp;nbsp;is not something you "add later." It's not part of the foundation - it &lt;EM&gt;is&lt;/EM&gt; the foundation. &lt;/FONT&gt;&lt;/P&gt;
&lt;P&gt;&lt;FONT face=Verdana color=#000080&gt;My experiences with designing scalable solutions has proven there is no free lunch nor any shortcuts that work. If anyone - me included - skips the work of designing for scalability, there comes a day when they (or I) must pay the fiddler. From what I hear and have experienced, designing in this fashion is most often sacrificed on the altar of&amp;nbsp;the deadline. Trust me, if it falls apart in&amp;nbsp;six weeks or six months, you haven't saved any time - and you may have lost a job or a customer.&lt;/FONT&gt;&lt;/P&gt;
&lt;P&gt;&lt;FONT face=Verdana color=#000080&gt;Someone told me this and I remember because it has proven true several times over: "&lt;EM&gt;Deliver quality late, no one remembers. Deliver junk on time, no one forgets.&lt;/EM&gt;"&lt;/FONT&gt;&lt;/P&gt;
&lt;P&gt;&lt;FONT face=Verdana color=#000080&gt;If you're building (or upgrading to) cutting edge technology, you need a DBA.&lt;/FONT&gt;&lt;/P&gt;
&lt;P&gt;&lt;FONT face=Verdana color=#000080&gt;:{&amp;gt; Andy&lt;/FONT&gt;&lt;/P&gt;
&lt;P&gt;&lt;FONT face=Verdana color=#000080&gt;Technorati Tags: &lt;A href="http://technorati.com/tag/Software+Business"&gt;Software Business&lt;/A&gt; &lt;A href="http://technorati.com/tag/scalable"&gt;scalable&lt;/A&gt; &lt;A href="http://technorati.com/tag/database+design"&gt;database design&lt;/A&gt; &lt;A href="http://technorati.com/tag/quality"&gt;quality&lt;/A&gt;&lt;/FONT&gt;&lt;/P&gt;&lt;img src="http://sqlblog.com/aggbug.aspx?PostID=1686" width="1" height="1"&gt;</description><category domain="http://sqlblog.com/blogs/andy_leonard/archive/tags/scalable/default.aspx">scalable</category><category domain="http://sqlblog.com/blogs/andy_leonard/archive/tags/quality/default.aspx">quality</category><category domain="http://sqlblog.com/blogs/andy_leonard/archive/tags/database+design/default.aspx">database design</category><category domain="http://sqlblog.com/blogs/andy_leonard/archive/tags/Software+Business/default.aspx">Software Business</category></item></channel></rss>