I had an old boss that got angry with me even though we were great friends especially professionally. He had a Developer write code to download and import the data for 1.2 million customers from a 3rd party data provider so that we could track daily progress of a customer migration we were doing. The Developer did a good job but it took more than 15 minute for him to just import the data into SQL Server never mind validating any of the data.
I suggested that BULK INSERT would be much faster and that I could set up some validation that would work during the import itself and would also sequester bad rows in a file for rework... and got yelled at with the normal "just because you can do something in SQL Server doesn't mean you should" and that I was a "one pony show" and that "to a hammer, everything is a nail", and all sorts of the same junk many of us hear from other people. I didn't yell back nor fault him for his unkind comments because he just doesn't know what he doesn't know.
I got with the Developer (who I got along with very well) and he gave me all the details I needed to do a rewrite using T-SQL and then implemented the code. My boss, the guy that yelled at me, was the one that ran the code every morning. After the change I implemented, it ran the import, validation, and transfer to the final table in 55 seconds. My boss was totally unaware but saw how short it ran and went running to the Developer saying that it ran too fast and that something must be wrong and it needed to be fixed NOW! The Developer said there's nothing wrong with the code (he had already produced the reports) and said to talk to me. After checking the reports to make sure they were accurate, my boss called me into the office and said "Ok, what did you do". I told him "I used a hammer while I was riding my pony". He smiled and said... "Heh... and now you're going to call me an idiot". My response was, "No... you already know that". Like I said... we were good friends and have remained so. To this day, he'll occasional call me and tell me he needs to "Hammer something out" and asks if I can help. The answer is always yes.
The point I'm trying to make here is that people already have the tools sitting right in front of them to pull off miracles. They simply don't take the time to learn them because they're not "hip" enough because they're not "all the rage" of the latest shiny new object . They fail to realize that (and I actually had a friend make me a hand-drawn piece of artwork with this) "Before you can think outside the box, you must FIRST realize... you're in a box".
is pronounced ree-bar and is a Modenism for R
First step towards the paradigm shift of writing Set Based code: Stop thinking about what you want to do to a row... think, instead, of what you want to do to a column.
If you think its expensive to hire a professional to do the job, wait until you hire an amateur. -- Red Adair
When you put the right degree of spin on it, the number 318
is also a glyph that describes the nature of a DBAs job. Helpful Links:
How to post code problemsHow to post performance problemsForum FAQs