SQL SERVER – Getting Started with Execution Plans

Execution Plans is one of the most interesting subjects and I often get a question about it. Many people want to know how to get started with the execution plans and this blog post is briefly discussing the same subject. As a part of removing the older blog posts which are no longer relevant, I am updating this blog post with the new content about it.

SQL SERVER – Video – Beginning Performance Tuning with SQL Server Execution Plan

Traveling can be the most interesting or most exhausting experience. However, traveling is always the most enlightening experience one can have. While going to a long journey one has to prepare a lot of things. Pack necessary travel gears, clothes, and medicines. However, the most essential part of travel is the journey to the destination. There are many variations one prefer but the ultimate goal is to have a delightful experience during the journey. Let us learn about Performance Tuning with Execution Plans.

SQL SERVER – Execution Plan Ignores Tabs, Spaces, and Comments

Just another day I was delivering my training SQL Server Performance Tuning Practical Workshop, I noticed that organizations had many stored procedures but none of the SP had any comments. When I asked them why their Stored Procedures does not have comments, their point was that they believed because of the comments, the size of the execution plan increases. Not True, when SQL Server builds an execution plan, it ignores tabs, spaces, and all the comments.

SQL SERVER – Puzzle – Why Such a Complicated Execution Plan for a Single Row, Single Table Query?

It has been awhile since I asked any puzzle on SQLAuthority.com, Let us see a very simple puzzle today which involves execution plan as well. To simulate the puzzle, you will need to install WideWorldImporters sample database in your system. You can find the complete instructions to install sample database over SQL SERVER 2016 – How to Import New Sample Database WideWorldImporters.

Reference: Pinal Dave (https://blog.sqlauthority.com)

Execution Plan
Previous Post
SQL SERVER – Adding Column is Expensive by Joining Table Outside View – Limitation of the Views Part 2
Next Post
SQL SERVER – Plan Cache – Retrieve and Remove – A Simple Script

Related Posts

28 Comments. Leave new

  • did you come back on 22nd AUG? if yes, than I guess that issue came in today’s news paper “Gujarat Samachar” on page no. 13

    Reply
    • Yeah the same flight!

      Reply
    • priyangna puri
      May 11, 2012 2:10 pm

      i would like to mention here that spice jet staff of jaipur is very dedicated towards their duties even i can mention name of one of the staff member Mr. Rajesh Madnani who is totally dedicated to his duty and always help passengers and deal them wid care whenever they are in trouble , so if management has some weak points can remove to make their airline best , regards

      Reply
  • Sir i seriously advice you to print this article in the daily newspaper….only that can make these obnoxious people be on line and treat passengers like they have to…….

    Reply
  • You can escalate it to media. Court will follow the matter thereafter. Once initiated you will definitely get support as you are not the only one you faced these kind of problems many others had gone through various situation ….and slowly you will definitely find everyone raising their hands with you….. moreover don’t worry about the names of the staff(if you don’t remember) as management knows who were there at that time so you will find the staff member who was there at that moment.

    They should know how to behave specially with the elders and the passengers having infants (as they need more care then young ones).

    also writing this blog is the right step ….. go ahead and teach them the lesson…..

    Take care of your daughter…..

    -Anil

    Reply
  • Marko Parkkola
    August 27, 2010 9:59 am

    Uhhuh. Luckily I’ve never got such low quality service from anywhere even though I usually use these cheap flights. I feel really sorry for you. And I feel sorry for your daughter also. I have almost 2 year old daughter.

    I personally love flying. Even small trips inside Finland are better than spending the whole day in a amusement park. To be exact I love takeoffs and landings so maybe short flights are better than longer ones anyway :)

    But what I don’t like is security at the airport! I’m not a terrorist! My deodorant or toothpaste is not a plastic bomb! I’ve been hand searched five times in my last six flights and it’s getting really annoying.

    Last time I got so furious that I almost missed my flight. I had bought a small flashlight on my trip and it was in my backpack. Security didn’t let me take it to the cabin so I had to walk back to the check-in and put my backpack into the cargo hold. I went then back to the security and asked what’s so terrible in a small flashlight, which didn’t even have batteries in it, that I can’t take it in the cabin. They told me that I could use it as a weapon and hit somebody. So now I’m a violent criminal who beats everybody up with a flashlight. Huh!

    I’m a pretty big fellow (190 cm, over 100 kg) and I’ve practiced martial arts some years. I thought about asking the security personel if they really think that I need a flashlight if I wanted to hit somebody and are they going to strap me into a chair in the plane so I don’t go and beat everybody up. I almost said this to them but then realized that I would be spending next few hours in airport jail and face some hefty fines for it.

    Complaining at the airport is a waste of time and if airport or airlane personel wants to get nasty they can call up the police anytime they want. All they have to do is tell the officer that you were acting suspiciously and you’ll be sitting in the interrogation room for couple of hours. My former co-worker had this happen at N.Y. airport when he didn’t remember the exact street address where he was going to live during his trip. He was almost turned back to Finland, with his own cost of course.

    These days I don’t fly much. I’ll be visiting Italy in October though and I really hope that AirBaltic knows its stuff :)

    Reply
  • This is really disgusting and pathetic incident.

    Reply
  • Bad, bad very bad…
    I assume consumer forum should act strictly on such literal harassment.
    I believe such problem’s roots lies deep in to the top executives and management, which must stand corrected. Such “experiences” shall be answered by them. Pilots and ground staff are merely an employee, bound by their limitations.

    They’re in to providing cheap flights on the cost of worst consumer experience; but to attract more business! I wonder how can’t they understand this very basic rule: customer will return on satisfaction; or its business loss.

    Well, better luck next time.

    Reply
  • Using the press is the only option you have

    Reply
  • Can’t imagine such an experience with aircraft people. After paying such a high amount for travelling, it is very very bad. Even RTC(Road Transport Corporation) folks give lot of respect to people at my place. Humm… This is really bad :(

    Reply
  • Pinal,
    Sorry to hear that. I will suggest put this article on news paper as well contact ndtv 24*7. They have their facebook profile as well, if you do ndtv.com/facebook…..
    I have reported them about slow working acttitude of indian ambessay in uk and after that i am getting quick response from them whenever I contact embassy.

    Reply
  • kalyanasundaram
    August 27, 2010 7:27 pm

    Hi,

    I really sad about ur feelings.

    Because, the reason is you come with your infant child.

    So, U have a blog to post this information. Likewise, most of the peoples face this much incidents, but unable to express.

    Take action to this officers, then only others correct their mistakes.

    Reply
  • I don’t have Air India in my ranking list also.
    My first flight to US was the worst experience,

    I’ll share one experience ( I had many)

    I asked water. the old lady showed the attitude, gave me half glass of water. and I was thirsty so I asked more. and she told me, I just gave you water 2 mins back.
    ha ha ha.. what an attitude. I complained about her. but all are same.

    Reply
  • Ricardo Parente
    August 27, 2010 8:09 pm

    Pinal,

    That’s terrible.
    I think nowadays the airlines are becoming more like buses than airplanes fleets, with the difference that buses don’t charge for luggage. They try to cut their costs in all venues, but their prices are not coming down, and when they are about to go bankrupt, they also get bailouts.

    It seems to me that, not only with airlines, but with any kind of service, the quality is going down to the drain.

    Here in the US, the standards are a little higher, but even though, I notice many failure in customer care.

    I had many problems when I used to travel abroad for the company I work. Luggage lost, delays, missing connection flights.

    Once I flew from US to Malta and due to flight delays, I got there 24 hours later and without luggage, I had to borrow clothes to attend a meeting (the stores close on Sundays there), and in my way back, my luggage didn’t arrive either.

    I’m sorry for what happened to you, at least I traveled alone.

    Go ahead with your complains, they deserve it.
    I wish you the best for you and your family.

    Ricardo.

    Reply
  • Nakul Vachhrajani
    August 27, 2010 10:55 pm

    Couldn’t agree more with you, Pinal! I also hate, simply hate SpiceJet. I have had multiple such incidents – one in which on a flight from Delhi to Ahmedabad they had served a single cookie (with the tray moving so fast that if you blinked an eye, the hostess would move on to the next passenger) and a glass (small, extra-small one) of water.
    I have also noticed that all low-cost carriers also compromise on the quality of the pilots – I have witnessed the landings of the pilots of Jet Airways, Indian Airlines, American, Delta and British Airways – super-smooth. In fact, I find BA pilots the best. SpiceJet on the other hand has a tough time keeping the aircraft steady on the air! Leave alone landing it!

    The low-cost airlines are looting the citizens (SpiceJet is not an Indian entity). Why not give the money to our national carriers or travel by train/bus?

    Is this the way we (India) want to progress?

    My motto now is – “NEVER TRAVEL BY ANY LOW-COST AIRLINER!”

    Reply
  • Imran Mohammed
    August 28, 2010 8:05 am

    Hello Pinal.

    You should have noted down the name and designation of Spice-Jet Staff who said: Complain where ever you want.

    You have lot of patience Pinal. I wish I was like you, but If I was in your place, I would surely had fought with that guy for his rude behavior, but I do understand that you had your family with you. Any action of yours would only had made things worse for your family.

    May be you should write an email to Spice Jet customer care.

    I remember, I had same experience when I was coming from Delhi- HYD through Air-India. But I must say, Air India staff was polite and not rude at all. There was huge delay and they do not want to turn AC on. It was very hot inside Air craft, it was just horrible.

    ~ IM.

    Reply
  • Hi Pinal,
    Recently I was having a discussion with my colleagues regrading air travel, it is no longer what it used to be, with all the recent cost cutting measures, there is just a lot of animosity when it comes to service. Spicejet management needs to understand that consumer airline is a service oriented industry where the customer needs should be put right at the top….

    Ramdas

    Reply
  • May be it is late now and probably you already took some actions. However I would have taken below steps:

    1. Formally complain at Spice Jet )
    2. To check if you can sue them for harassment with a local attorney
    3. To run a campaign to highlight your experience with media and online (Hopefully this posting did enough damage to them. At least I will try to avoid them when I am at India)

    Reply
  • Hi Pinal,

    It angers me to hear your suffering. To add on, those insensitive people could not have cared less for even a infant. My god. Unbelievable !!

    Can you try posting this story to DGCA (Director general of civil aviation).

    Reply
  • Hello Pinal

    Sorry to hear about the incident. You can check how many complaints against domestic carriers :

    Also, feel free to write at (both email and letter) –

    and cc to lalit.dgca@nic.in.

    Also you can email to these contacts –

    Best of luck.

    Reply
  • Terribly sorry to hear of your bad experience with Spicejet.

    It happened with my daughter travelling on Spicejet flight (Bangalore-Jaipur via Mumbai) last month when that plane was diverted to Ahmedabad when approaching Mumbai airport. Then spent one hour in Ahmedabad for green signal to go to Mumbai. Flied to Mumbai for disembarking Mumbai passengers and embarking after one hour’s stay. After arrival at Mumbai, pilots and air crew changed their duties and others came after another 1 hour. It led waste of 2 1/2 hours while she spent more than 7 hrs in the plane.

    Suggesting that you will use other airlines flights like Indigo Airlines, etc in future.

    Reply
  • MICKEY MUTSUDDY
    November 4, 2011 10:11 pm

    I had a very sweet experience with spicejet. I travelled to mumbai from kolkata on 28th of October, 2011 BY flight no. SG 874 SEAT NO. 2A and came back on 2nd november, 2011 by SG 873 SEAT NO. 2C. The crew was wonderful and helpful. The flight reached us before scheduled time. BEST WISHES TO SPICEJET.
    MICKEY MUTSUDDY
    KOLKATA

    Reply

Leave a Reply Cancel reply

Exit mobile version