A closer look at everything related to SQL Server

In my second post regarding R and statistics, I am going to describe my registering for online classes. See here for Part 1.

First, I registered on Coursera.org for a class named “R Programming”. This is a part of a Data Science Specialization and is offered by JHU. This will begin on August 3rd. The other online course is from EdX.org and it is self-paced and is called “Explore Statistics with R”. The class already started on July 7th but I just joined it today. It will end on August 31st. Hopefully, I will catch up.

Among these 2 classes and the R study group that I mentioned in my last post, I think it will give me very broad and somewhat deep understanding of how to use statistics with R application to solve real life problems. I will be also be attending other complimentary user groups such as ChicagoCityData which explores city’s datasets such as https://data.cityofchicago.org/. It has datasets such as landlord’s list, Police stations, crimes – 2001 to present and other such interesting ones.

Now let me explain more about the courses that I am taking and how it is going to help me in reaching my goal. But wait! What is my goal? What do I want to achieve by going through all this trouble of learning R, statistics and user groups?

As a Senior SQL Server Database Administrator, I am very familiar with data, datatypes, storage, performance, optimization etc. But 20 years ago I graduated as an Electrical Engineer and Statistics and Mathematics were my two favorite subjects. And since becoming a DBA 14 years ago, I did not get to use these 2 areas much. Learning R is just like learning any other programming language, such as TSQL, which I am pretty familiar with. I am somewhat familiar with scripting language “Powershell” also. But learning both together, R and Statistics, and applying them to solve practical issues is my dream come true scenario. Currently I am working with SQL Server 2012 version. SQL Server 2014 is out there and SQL Server 2016 will be out next year. With 2016 version, Microsoft is tightly integrating R Studio functionality. So now Data Scientist do not have to wait to get their big datasets and then work on the analysis. They can do it right on the SQL Server. How much performance hit it will be is yet to be seen. So you can see my motivation here. I am not going to leave the world of SQL Server because I fell in love with it and I would like to fall in love with R and statistics too. I would like to find new meanings in the data that I have on my fingertips. Bring new insight to my company and become successful myself at the same time.

Enough about loves! Back to class descriptions.

1. R Programming : –

I have taken this class online exactly a year ago but it became harder for me after week 3 and I could not  finish the last project. So after one year this  “Study group for An Introduction to Statistical Learning with Applications in R” has reignited my interest in pursuing this course and towards Data Science Specialization. This is a 4 week course and starting on Aug 3rd, 2015, as mentioned before. It requires about 10 hours per week of your time. It uses a cool R self teaching tool called “Swirl” and a book. The course will cover the following material each week:

  • Week 1: Overview of R, R data types and objects, reading and writing data
  • Week 2: Control structures, functions, scoping rules, dates and times
  • Week 3: Loop functions, debugging tools
  • Week 4: Simulation, code profiling

2. Explore Statistics with R : –

I have joined this class today and as mentioned earlier it began on July 7th, 2015. This is an 8 week course and requires about 5 hours per week of time commitment.It uses the materials from here and here. This is a self paced course meaning all the 5 weeks materials were posted on July 7th. So you take your time to finish it by August 31st when some project is due. The main outline of this course is:

  • Week 1: Get to know R
  • Week 2: How to import and clean data in R
  • Week 3: Statistics under the hood: distributions and tests.
  • Week 4: Non-parametric tests
  • Week 5: Visit the research frontier

I can see some overlap here between the 2 courses and that is why I am thinking I will be able to finish Statistics course by Aug 31st even after starting late. At the meetups, I would also like to help others because I know how it feels when you are struggling and not sure of yourself whether you can do it or not and it is for you or not. I would be able to encourage people to keep learning and not give up. Fruits are right within your reach you just have to go little closer.

See you in next post!

Hi Fellow Readers,

I recently joined a study group called “Statistical Learning with Application in R” on the meetup.com and attended its first session yesterday in BrainTree’s office at 222 Merchandise Mart, Chicago.

This group is about those people who have some familiarity about R programming but lack the statistical depth or for those who know the statistics but are new to the R programming. Basically anyone having a motivation to learn something new and inclination to share their knowledge can join it. In future, meetup organizer may add Google hangout feature to the meetup so that remote people can also join in.

Statistical learning recently became hot topic with explosion of Big Data and Machine Learning. Moreover, the new job market for Data Scientist has given it much hype. But what is statistical learning? Basically it is the study of tools to help predict and infer from data. For example Linear Regression is used for predicting quantitative values such as salesman’s sales figure or individual’s salary. With the advent of computer technology in 1980s, it became feasible to calculate non-linear methods such as Classifications and Regression Trees. The subject of Machine Learning is essentially the study of statistics of non-linear methods.

Our group will be following the book “Introduction to Statistical Learning, 4th Edition” or ISL and the corresponding videos. This book is especially good for beginners.

From the book ISL itself, the basic premises of the book are:

  1. Many statistical learning methods are relevant and useful in a wide range of academic and non-academic disciplines, beyond just the statistical sciences.
  1. Statistical learning should not be viewed as a series of black boxes.
  1. While it is important to know what job is performed by each cog, it is not necessary to have the skills to construct the machine inside the box!
  1. We presume that the reader is interested in applying statistical learning methods to real-world problems.

This is enough for the first post on this topic. I am planning to write more as my jouRney progresses.

I am doing log shipping since SQL Server 2000. I did it with SQL Server 2005. But for the 4 years that I worked with SQL Server 2008 R2, I did not work with Log shipping. Nothing has changed in SQL server 2012. But to refresh my memory, here I am writing down simple steps for setting up log shipping.

  1. Make sure database is in Full recovery mode. In this case primary server is PriSQL\Prod01 and primary database is PriDB.
  2. Pre-initialize the database at secondary. It means take the full backup of PriDB and a transaction log backup of primary database SecDB and restore on secondary SecSQL\DR01 in Standby mode.
  3. Right click the primary database, go to properties and select “Enable this as a primary database in a log shipping configuration”.
  4. Select how frequently you are going to do log backups in “Backup Settings” button. Also provide the path where log backup goes. Some other settings on this page are set as follows:
    1. Delete files older than: 72 hours
    2. Alert if no backup occurs within: 2 hours
    3. Backup schedule: Every 15 minutes
    4. Backup Path: E:\SQLBackups\PriDB_log
    5. Job name: LSBackup_PriDB
    6. Backup compression: Use default server setting.
  5. Add the secondary server. In this case it is SecSQL\DR01. Secondary database is SecDB.
    1. Tab- Initialize secondary Database:
      • Select database is already initialized.
    2. Tab- Copy files:
      • Destination folder for copied file F:\SQLBackups\LogShip
      • Set 72 hours for Delete copied files.
      • Copy job: LSCopy_PriSQL\prod01_PriDB
      • Copy Schedule: Every 15 minutes.
    3. Tab- Restore Transaction Logs
      • Restore job: LSRestore_PriSQL\prod01_PriDB
      • Restore Schedule: Every 15 minutes
      • Delay restoring: 1 minute
      • Alert if no restore occurs: 2 hours

After much planning and cajoling, we finally were on our way to vacation to Canada.

Saturday, Jun 13th

We left home (Glenview, IL) at 7:30 AM (half hour later then planned) and arrived in Detroit, Michigan at 1:30 PM. Time moved ahead one hour. On the way, we stopped for 30 minutes for gas and food. We stayed at La Quinta Inn and Suites hotel and were very impressed by the high standards of this place. They offered free parking, breakfast, outdoor pool and a small gym.

We checked in and changed and left to see Belle Isle, a 36 minute drive from the hotel. We saw the oldest North American aquarium, fishing pier and a conservatory. We took lots of pictures; some of which I will share here. We then just drove to downtown Detroit and looked at the city’s architecture. Tigers (Detroit’s baseball team) was playing against Cleveland Indians at Comerica Park. We saw stadium was full and people cheering.

We at fishing pier  near Detroit, Michigan

We at fishing pier at Belle Island near Detroit, Michigan

Belle Island Conservatory

Belle Island Conservatory

For dinner we went to Chilli’s restaurant and afterwards we did some shopping at GAP and T.J Maxx stores.

We came back to hotel, changed and went to the fitness room and worked out for 30 minutes.

Sunday, June 14th

Everybody was refreshed after the comfortable night’s sleep and substantial breakfast in the morning. We resumed our driving at 9 AM and arrived at Niagara Falls, Ontario at 1:30 PM.

We stayed at Marriot Gateway on the Falls hotel. Our room was on the 26th floor with full view of the Niagara Horseshoe Falls, American Falls and the Bridal Veil Falls. We could see the New York side of the Niagara Falls Park also. Weather was cloudy so the usual fireworks at 10 PM was cancelled that night.

We booked a fully guided and narrated tour with Magnificent Tours and they took us to the 3 attractions; Skylon tower, Journey Behind the Falls and HornBlower Niagara Cruises. There were 12 people on the bus including us. We met a very nice family of 3 consisting of a grandson (age 16) and grandparents on this tour and most of the time we stayed together.

Skylon tower was 775 feet tall and gave us the crystal clear views of the city of Buffalo, NY and Toronto. We could see the falls from the top, Rainbow Bridge, Goat Island etc. We took lot of pictures.

View from the Skylon Tower

View from the Skylon Tower

Niagara Falls Behind the Scene tour was an exciting and humbling experience. Tunnels were built under the falls and there were different viewing windows where you can see the falls from under them and can experience the power of them.  It was like a hands on Falls museum with various historical facts about the place such as how those tunnels were built how deep was the fall in 1676 and every hundred years after that, showing how much corrosion and erosion has happened etc. Many times I feared that if this tunnel caved in today, there will be no sign of us.

Behind the Falls

Behind the Falls

Behind the scene view of the fall

Behind the scene view of the fall

Look! how much fun I am having.

Look! how much fun I am having.


Observation deck at “Journey Behind the Falls”.



The 25 minute tour on the boat which took us close the Horseshoe fall was once in lifetime one.

Falls from the boat

Falls from the boat

We dined at the magnificent Milestones restaurant at hotel where we were staying.

We in the elevator mirror, en route to Milestones

We in the elevator mirror, en route to Milestones

Monday, June 15th


Two days ago, I attended a one day training session on the topic of “Dynamic Public Speaking” from the company called National Seminars Training by Rebecca Pace.

Following are some of my notes from that session. I like to take lots of notes so I can remember most of what is taught and presented. Life is so busy that if you do not take time to note down things, you will forget it very soon.

Though I am not a presenter, but there are many occasions where I have to speak such as explaining to my boss why we need to upgrade SQL server, show developer why something is cool and solves problem easier than the older method, also communicating with other vertical teams.

Rebecca started the session by asking participants, what they like to get from this session. She gave lots of tips and tricks to each one of us. This took 1 hour and it was immediately evident to me that this session will be interesting. I will be listing my notes in the forms of the tips and put them in various categories. I hope reader of this page will find them useful.

Fear and Nervousness:

  1. People who come to listen to you are either in agreement with you or will be providing resistance. It is better to know your audience beforehand and particularly useful is to know the type of resistance you will be getting.
  2. If you fear, you are going to black out, use index cards. Only jot down few words in bold and big fonts as a reminder cue for yourself.
  3. Another trick to calm yourself down during the presentation is to put 3 personal items at different location beforehand in the presentation room. So when you are nervous look in the direction of one of your item and it will give you connection to yourself and relax you.
  4. Remind yourself frequently that what you have to say is valuable to others.
  5. To make your presentation your own like a worn out pajama, you need to present it 6 times.
  6. When preparing, always target to the middle of the intelligence level of the group. That is why knowing your audience ahead of time is important.
  7. Audience want to know you as a person. So be yourself. Your accent, ethnicity and any other cultural difference make you more unique. Play it to your advantage. Be creative how you present yourself.

Audience Retention Problem:

  1. Do not try to force feed your audience. Lay low on information overload. As a speaker you worry that you don’t have enough content and you over prepare and then you want to give out all this information.
  2. Be conversational with your audience. Engaging and creating personal connection is more important than the content itself. Because an engaged audience is going to listen and understand your presentation.
  3. Leave the technical jargon for the slides or the handouts. While you speak use common words and simple English.
  4. Let your audience take notes, don’t give them everything on the slide and give them handouts toward the end of your presentation. By taking notes they will pay more attention and will retain more.

Tips on Presentation Slides:

  1. How many slides should you have in a power point? According to Rebecca, for an hour long presentation you should not have more than 5 slides. The reason being you want your audience to engage with you more that with the slides itself. Give additional material in handout. Use lots of colors and visuals. Remember less is more and a picture is worth a thousand words. Use less words.
  2. Have 8 facts about yourself on the last page. Preferably 4 of them regarding your professional\business and 4 business\personal details.
  3. If you are giving a 30 minute speech, about 4 minutes should be opening to hook the audience to your talk. And if 1 hour talk use 6 minutes. This is a rough guideline.
  4. If you are showing video clip, make sure it is not more than 3 minutes. It is very important that you explain what audience is going to see and after the clip engage to get the understanding of the audience.

Before Presenting:

  1. Presentation takes lot of energy from the speaker. You need to be rested and prepared. You have to project your voice to each of your audience. Bigger audience means you will spend more of your energy.
  2. Use coffee, or tea with peppermint oil drops, or Singer secret throat spray to dilate your larynx. You will have a richer and more powerful voice. Read book “Voice and the Actor”.
  3. If you have a habit of talking fast, then take a notebook on the podium or table and turn pages that will slow you down.
  4. Eat some complex carbohydrates before the presentation to low down your energy level if you are a fast speaker.
  5. Wear clothes (even undergarments), shoes, hair etc. which are comfortable and forget about them when presenting.
  6. Practice editing your face by keeping mirror in front of you when talking on phone. Smile more.
  7. Don’t shoot for 100% perfectness in you presentation. Shoot for 85% or greater. Be flexible and ready to roll if conditions changes.
  8. For practice, do it before mirror, record yourself, and notice your postures and gestures. Do you look confident? Fake it till you make it.
  9. Listen to great speakers like Martin Luther King, James Earl John. Listen to comedy shows. Another example is to notice the difference in Whitney Houston and Dolly Patron delivery of the same song (I love you).
  10. Do your homework.
    1. Whom I will be talking to?
    2. What are the circumstances?
    3. How long is my presentation going to be?
    4. Where will the presentation occur?
    5. Why I am doing this presentation?

During Presentation:

  1. Include a little ice breaker in the beginning, even if it is not related to the topic, just to get audience connect to each other.
  2. If some people are running late, ask audience if you should wait for them or begin.
  3. Speak with more animation that your normal voice. Create more volatility in your voice.
  4. During presentation, make eye contact with as many people as you can.
  5. Communication Pie
    1. 55% is what you see
    2. 38% is what you hear
    3. 7% is the language you choose (use spicy adjectives to grab attention and create mental pictures). For example: “This is what we achieved…..” versus “This is the red velvet of achievement…..”
  6. To create personal connection with your audience, use any of the following.
    1. Appropriate short personal story
    2. Invite people to comment and ask questions
    3. Mingle with your audience 5-10 minutes beforehand
    4. Be your authenticate self
  7. Improve your communication by listening during your presentation.
    1. Listen to what is being said, even if you don’t agree,
    2. Be quiet.
    3. Allow time for discussion.
    4. Keep an open mind.
    5. Don’t plan your response while the other person is talking.
    6. Minimize interruptions.
    7. Remain objective, don’t get emotionally involved.

At the end:

  1. End your presentation with succinct summary, or a quote or the benefit of the product or idea. End on a positive note and try to get the emotion from the audience.
  2. Some resources to continue your learning and development as a presenter
    1. Oriental trading toys for icebreaking or other games
    2. Hallmark blank quotation cards, write quote’s
    3. Book: Secrets of power Negotiating
    4. Book: Psychology of Achievement by Brian Tracy.
    5. Singer Secret throat spray.
    6. Spirit Gum to train you face muscles.





Speaker: George E. Vaillant, M.D.

Date Wednesday May 6th, 2015

Speaker was 82 year old, professor of Psychiatry, Harvard medical School. Study “Adult development” from 1928 to present.

Notes from the lecture:

It is basic human hunger to be recognized, heard and seen. Without which it we would not thrive as a human being. Sometimes our sensitivity about ourselves becomes too much in this complex world and we want to step back. People do crime, or drug, or suicide, or drown themselves in work etc; in order to cope with anxiety.

We are interdependent on each other to survive and thrive. War are seeking comfort, respect and safety. We are never satisfied and full. Hunger for more constantly grows. Mind is never at peace and we constantly juggle for balance. This is where mindful meditation can help us. Come out of orbiting thoughts and sense where your body is and keeping this awareness even as you are listening, talking or doing anything. This is like pausing constant buzzing of mind. This is remembrance and not thoughtlessness.

Being aware of what mind is doing, brings peace of mind. This is because now you feel safe and seeing things as it is and not some fabrication of your mind. With patience, tranquility and contentment comes. Take this to next level by engaging into interpersonal mindfulness conversation.

Six steps of Insight Dialogue:

  1. Pause
  2. Relax
  3. Open
  4. Trust Emergence
  5. Listen Deeply
  6. Speak the Truth

Taken together, these guidelines offer essential support for awakening amid the rich challenges of interpersonal encounter. Each guideline calls forth different qualities, and all of them are complimentary.

Pause calls forth mindfulness; Relax, tranquility and acceptance; Open, relational availability and spaciousness; Trust Emergence, flexibility and letting go; Listen Deeply, receptivity and attunement; Speak the Truth, Integrity and care.

In everyday life, the guidelines can be taken up as needed to support a kinder and more mindful way of relating. In meditation groups or retreats, these instructions are introduced individually in an atmosphere of dedicated practice and mutual commitment.

Today, I explained to my internal IT team and a DBA on another team about the advantages of using AG for Disaster Recovery scenario. They had lot of questions and I prepared myself with these documents. I drew the scenario on my board and took the picture of it. I modified the presentation I got from one of the SQL Saturdays I attended. I downloaded Word document on this topic from MSDN site.


Building a High Availability and Disaster Recovery Solution using AlwaysOn Availability Groups




I think people are hesitant to change because they do not want to come out of their comfort zone and\or not knowing enough about the new technology makes them less confident. They like to stick to Log Shipping because it works. Another uncertainty was about geo-clustering or AG on different subnet for DR. Here I also lack knowledge so I pointed out this would be a good oppurtunity for all of us to learn and we will have one more option for DR in case log shipping feature is not available in future SQL Server releases. Then there was bad experience that the team had several years ago with Failover Clustering. It used to take time for SQL Server services to come up. I know I have lot to do to change the mindset but so little time. In the end, I got the agreement that we will create one DR box in the second data center where I will do the log shipping and also will include it in my current Availability group configuration. Let us see how it goes.

Friday 04/10/2015
SQL Saturday Madison Pre-Con: Planning a SQL Server High Availability and Disaster Recovery Plan with Ryan Adams

I have read and researched and tested and have implemented in production many high availability (HA) solutions. But things keep on changing as new SQL Server features become available. Not forgetting that hardware side of the things (VMs and Azure clouds) also keep changing. SQL Server offers many options, but how do you choose the right one to meet your business requirements? In this one day class, Ryan took us from basic of Backup and Restore to Windows clustering and Availability groups. In between we touched pros and cons and gotchas of log shipping, mirroring and replication etc. Every feature has pros and cons. It will be hard to list all here.

He gave us a scenario in the beginning of the class and we were to design our solution as class progresses and our knowledge increases. The scenario was to configure a HA\DR plan to ensure a company’s systems are always up and running and can withstand a technical or natural disaster. There are 3 data centers Maine, California and Arizona. Network connection between Maine and California is excellent and between Maine and Arizona is okay. There are 3 critical databases in Main that need HA\DR and Reports can be 2 hours behind. Only one solution was asked and I was able to design 2 solutions and instructor was impressed and asked me to present my thought process behind it.

You will ask why backup and restore discussion in HA class? Answer is proper backup and restore strategies are foundation for successful implementation of any HA\DR solution. I learned and saw firsthand in demos that using backup options such as MaxTransfersize and BlockSize (which are not available in Maintenance Plan utility) can cut your backup and restore time in half. This is not important to us now but I learned something new. I can use them now to plan backups if and when our DB Sizes reaches into 100s of Gigs.

I also learned that in my recent availability group setup, I had omitted one important step and that is having 2 NICs connected to each Node of the configuration. I have to talk to our IT guys now.

Saturday 04/11/2015 (FREE TRAINING)

Now I will briefly describe the sessions that I attended on Saturday. There were 7 tracks and 7 x 5 = 35 sessions. But unfortunately, one person can only be in one session at a time. Each session of 75 minutes. I chose to attend following 5 sessions.

Session 1: Practical Powershell for DBA
This session was 90 percent demo of the scripts that the presenter was using himself at his work. It not only showed the actual work but also the possibilities in my work where I can extend the functionality. It was mostly geared towards people who have 30 to 300 sql server instances to manage. I don’t see why this cannot be used in our smaller shop. I have used Powershell scripts in the past employment and can use it at present job for Database maintenance work.

Session 2: SSMS Showdown
This was my favorite session of all. 2 presenters acted as they were competing against each other to show us the coolest tips and tricks of SQL Server Management studio (lovingly called SSMS). There were 5 rounds so we should be learning 10 coolest tips but in order to outsmart the opponent each presenter tried to show us more in one round. We, audience, voted after each round. I am planning to show what I learned here to my development team. It can be really useful in our day to day dealing with TSQL scripting and coding using SSMS. It will improve efficiency and overall quality of work.

Session 3: Collect baseline for all your servers
Base-lining is important because before we answer why the system is slow or what is wrong with SQL Server, we need to know how it reacts under normal circumstances. Again everyone has their own tool of collecting server level and database level information for trending and troubleshooting purposes and this presenter showed his own. He used SQL Server Integration Services (SSIS) to collect his baseline metrics. I saw the benefits of using it and how flexible it becomes when you have to monitor several servers. You only need to make a change in the environment variable in the configuration file and you can use this same solution across multiple servers from Dev to production. Since connection managers uses the standard connection strings, no linked servers were required.

Session 4: Administering SQL Servers for Development Teams
There were 2 presenters. One was a DBA and another was a developer. Since this is my first job here where I am actually the part of the sprint meeting every day, I thought I would attend this session. I did not as much learned anything new in this session as it validated and confirmed what we are doing is right with our sprint meetings, agile methods and TFS to track bugs and source control to save codes etc. I wish I could bring some new information but glad to know that what we are doing at work is exactly as the best industry practice suggests. It also talked about how DBA can help developers and again we are following that method here.

Session 5: Automated SQL Installs
I chose this session because it was going to be all demos while other sessions can be followed through the PowerPoint slides and script that each presenter post on SQL Saturday site. I followed through 3 quarter of the session than I lost it because it was too technical for me. Also at that point I realized that although this is nice to automate base SQL server install, Service pack upgrades, Cumulative upgrades and patches etc., we are not going to use it here due to security concerns etc. But again the point of choosing the sessions is to go little bit out of your comfort zone to learn something new. I think I know where to turn to if in my future career time comes to use the Automated Install of SQL Server. Presenter used CodePlex project “FineBuild” (open source) to show us step by step process of building install scripts and not every but most of the possible options to select.

Final thoughts:
I know many of these things that I mentioned above can be learned from the books or attending online webinars etc. But the enthusiasm of the speakers, volunteers and participants cannot be bought or experienced without being there in person. As a SQL Server professional you need that face time with MVPs and see firsthand their confidence, humility and spirit of giving back to the community. This inspires us to go extra mile at our own work place and feel joy from applying the new concept, trick or shortcut just learned from the industry experts. It also makes us humble and never feel ashamed of our shortcomings or learning from others. It is like a dose of medicine that you need to take periodically throughout the year. Therefore I am planning to attend at least 4 SQL Saturday events each year. Another benefit of attending these community events is that you build new and maintain existing relationships with presenters and vendors.

Whether you are starting a new job or at your existing job, it is never too late to organize your SQL server database shop. As somebody famously said, “Organize, don’t agonize”. Having clear idea of what is needed to be done already puts you ahead of your task. As we all know, some DBAs are either doing nothing or fighting fires. We do not want to fall in that category. Best use of slow time is to get organized. Here are some tips to help you achieve that Zen like balance.

Create a list of SQL Server information site:
You cannot keep all there is to know about SQL server in your mind. So what to do about it? Write it down. Yes, either create a spreadsheet and save it in a table or save it on your own blog. Whatever tool you choose, it is important that you feel comfortable using it. Save addresses of MVPs blogs , SQL Server Online forums and other tips and tricks. After a while it will become overwhelming list if you do not configure some type of classification or tagging system.

Note: I will be adding more here later on.

Recently, I had an opportunity to attend Adam Mechanic’s “Parallel Execution Performance” class. He offered this class as a Pre-Con to SQLSaturday #291. I do not need to mention he is super intelligent guy who wrote universal stored procedure called “sp_whoisactive” and is used by most of the DBAs all over the world. But he is also a very good teacher and presenter. Here I will try to explain some of the nuggets of wisdom I collected from the class.

He mentions world in general and technology in particular has changed. So today’s DBA also need to change how they think about performance and bottlenecks. What was true 10 years ago maybe not true at all today or partially true. Adam said in Query Execution Plan there are 2 types of zones; parallel zones and serial zones. It is the serial zones where opportunity of performance tuning lies.

Although I was familiar about the Moore’s Law, but there were other laws that apparently I was not aware of. One is Amdhal’s law and other is Guftan’s Law. He gave an example to understand Amdahl’s law. Consider a restaurant Chef preparing a dish containing 3 items. Each item takes 10 minutes to prepare. And final plating takes 10 minutes. Altogether it will take 40 minutes to prepare one plate. She hires 3 cooks and now each cook prepares the single item and gives it to chef for plating. So instead of 40 minutes, dish is ready in 20 minutes. This is 50% increase in performance. This is not a linear relation ship and it is explained by the following formula.

improvement = 1/(1-P) +p/N

= 1/(1-.75) + .75/3 = 2 ( 50% increase than serial task. There were 3 cooks who can work in parallel, plating time was serial)

Let us now add one more cook. P = .75, N = 4

improvement = 1/(1-.75) + .75/4  = 2.385 (42% increase than serial task. There were 4 cooks but 3 tasks. Plating time was still serial)

Let’s add one more task. P = 0.8, N= 4

improvement = 1/ (1-.8) + .8/4) = 2.5 (60% increase than serial task. Serially it would have taken 50 minutes for chef to finish the dish with 4 tasks plus plating.)

I hope you get the idea. To me this is very interesting to note. I will try to find other areas where I can use this logic. Back to the earlier example, we see that if no. of tasks equals to no. of cooks, parallelism gives optimal result but the serial part of plating the dish is constant. If we improve that part of the process, it will give more performance improvement.