Saturday, December 30, 2006

POW time !!!

Hope everyone had a Merry Christmas and are getting ready for a Happy New Year. I was on vacation the week before Christmas. My brothers and nephews came to Idaho for a visit and a lot of Snowboarding. We've had pretty good snow the past couple of weeks. We had an "epic" day at Brundage Mountain just outside of McCall Idaho which is 2.5 hours North of Boise. It dropped over a foot one night and we were the first ones on the lift. It was great floating on the fresh POWder.

Heading to Grand Targee Ski/Board Resort in Eastern Idaho for New Years. A safe and Happy New Year to everyone.


Friday, December 29, 2006

Is it just me?

Sometimes I feel like I behave like a simple CBO. I'm about to go home, driving from Austin to Houston. So in my mind I'm already building an execution plan:
- don't have enough fuel to get home, so
- i'll stop in Brenham at the Shell gas station
- get fuel
- if busy, move my car to parking spot
- go to restroom
- go to McDonald's to get a milkshake
- ready to make the rest of the trip home without another stop

I do this a lot. I'm wondering, am I weird or is it just a by-product of being in this business too long (or both)? When I got married, in the beginning I would get a bit irritated when my wife and I would have to do some spontaneous shopping. For example, we would be on our way home, and my wife would say "we need some milk, let's get some at Heb". This would cause me to build the execution plan for getting milk:
- walk to back of store where milk is
- get milk (vitamin D added)
- get in line at check-out
- pay and go home
Simple, fast and effective. But regularly my wife would invalidate this carefully constructed plan: "We're here anyway, let's also get some veggies/meat/whatever". Yikes! Not good! You said we we're getting milk, not get groceries (a totally different plan)! Luckily, I've adapted to that. I now allow for the variation in the plan. When we go into a supermarket, I just get a shopping cart by default...

Happy New Year to everybody!

Sunday, December 17, 2006

Thursday, December 14, 2006

Mustang in Rochester

Some times companies do nice things for folks, like Hertz this week gave me a Mustang Convertible. However they seem to only do this when it's not convertible season. Like this month, December. I'm in Rochester New York with this rather nice car, too bad that I drive into the place I'm teaching at in the predawn hours and back to the hotel after sunset. It has been in the 50s during the day, but I wouldn't know it since I'm in the center of the building with no windows. Oh well, it's nice to have a car with a serious amount of pep in it. Pushing down on the slanted board sure makes this thing go!

Monday, December 11, 2006

Some Great News

We've had a lot of students ask when there would be a graphical interface for the Hotsos SQL Test Harness. Great news !!! Last week Dave Stone of the Hotsos development staff attended OPINT in Dallas. Rumor has it that Dave will be developing the new GUI for the Harness and that was a big reason for him attending the course. Most excellent !!! Here's Dave plotting (???) how he's going to accomplish this feat.

Friday, December 1, 2006

Rain Ice and SNOW in Dallas

I had a great teach of our Performance Diagnostics class this week in Dallas TX. All things went rather well until Thursday when I was flying home. Of all things it was SNOWING in TX while back in MI it was raining. I had a connection thru Memphis this time. I had about and hour and half lay over so should have been a piece of cake to make the flight....

The plane was late getting into Dallas, and then we had to de-ice, which apparently is not something they do often at DFW. That took quite a long time, mostly because they didn't seem to have many de-icing trucks. And just to make things interesting it was a CRJ aircraft so I had to plane side check my carry on bag. All this added up getting to MEM with about 20 minutes. And you know it, the gates were on near opposite sides of the airport!

I walked on the plane behind the gate agent who was bringing down the flight manifest, that's really much to close!

Terrorist Targets (not) and Tasty Kakes!

I've been conducting Optimizing Oracle SQL Intensive this week in King of Prussia, PA. Most students are from PJM (which manages a huge power grid here on the east coast). Other students are from SIG, Dorman Products and Vertex Inc. I'd ask the students from PJM if they would like to host the Performance Diagnositcs course on-site but just yesterday they were identified as the number 2 terrorist target here on the East Coast. Re-thinking that request.

But I made a great discovery week .... Tasty Kakes !!! Individual deserts kinda' like Lil' Debbie's. Made locally here in the Philly area very "tasty" no pun intented.

Monday, November 27, 2006

Beaverton, OR Optimizing Oracle SQL class - Day 1

Day 1 of our Optimizing Oracle SQL Intensive course started off with 10 bright-eyed students today in Beaverton, Oregon. This week we're fortunate to be hosted by the Oregon Graduate Institute at their wonderful facility.

Things got off to a good start and day 1 ended with one student commenting " head is full"! And it's only day 1!

Monday, November 20, 2006

A word from Dilbert

I had to laugh at this. Sometimes I swear I think this argument works better than all the facts and figures in the world!

Of course, they probably didn't need to upgrade their servers was probably just bad SQL!

[Dilbert comic strip from Aug. 5, 2006 - copyright Scott Adams, Inc.]

Thursday, November 16, 2006

Home...yet on the road...

When I'm not on the road teaching, I have the wonderful luxury of working from home. But, after you've worked from home for a while, sometimes you just need a change of pace. So, today I took my laptop and headed to a nearby Starbucks. It's very strange, but I actually am getting as much work done as I had been while at home. Not to mention that I'm happily sipping a Grande Decaf Non-fat No-whip Caffe Mocha as I work! (This coffee delight may make the more hardcore coffee drinkers grimace. A friend of mine calls it a "why bother"!) A light jazz CD is playing in the background and I'm settled into a quiet corner. Not a bad way to work!

Now...if the course I'm developing ends up having lots of coffee and jazz references in the notes, you'll know where they came from!

Wednesday, November 15, 2006

Tell me why...

For the second time this week I was asked to take a look at a query that's used to generate a report. Problem is, when generating these web based reports, the sessions are timing out. The query I got on Monday ran in 15 minutes resulting in almost 2 million rows. Yes, 2 million! The query under investigation today ran in about three minutes resulting in about 160,000 rows...

Call me crazy, call me mad, but somehow I don't see the point. These queries would result in reports of thousands of screens long! I can't believe that's really what the business users want. So apart from trying to speed up the queries, we'll ask those business users what it is they really want. Chances are, we can add some default where clauses to these queries so the result sets will end up being a bit more sensible...

Jan van Mourik

On board

Hello all, Monty here, just saying hello and look forward to keeping track of all our happenings.

Everlost in Austin

I’ve use the Hertz Neverlost system many times all over the United States and it’s served me well everywhere. Except Austin Texas. What is going on in Austin? Is this like the Island in Lost and there is some huge electro magnetic disturbance here that it throwing off the navigation system? I got to my hotel only because I first printing off directions for yahoo maps at home. The Neverlost system had showed me a route to a spot where that was off by about 25 miles. The good thing was that I was next too the freeway I needed to get on to get to my hotel.

Last night I was sitting in the parking lot of the hotel and pulled up Neverlost, I went to Yellow Pages, then Hotels, then Nearest, I picked my hotel. Neverlost said my hotel was 25 miles away. Gee that’s funny I can look out the window of the car and the hotel is RIGHT THERE!

Well at least FedEx knows where my hotel was. The package sent to the hotel for me was here when I arrived as expected.

I tried using Neverlost to find a Kinko’s around here, again it was miles off. I wasn’t able to find the place until I asked a local where it was.

The map view on Neverlost does seem to work. And I hope it can find its way back to the airport at the end of the week.

Tuesday, November 14, 2006

Don't do work you don't have to do!

Thanks to my Hotsos colleague, Jan van Mourik, who sent me this example. The original SQL statement appeared to be spending alot of time doing sum(case...) constructs to count the number of times an order was created for each hour of a given day. The SQL was rewritten to simply get the counts by day and by hour and then pivot the results into the display format desired. The response time improvement was spectacular (as measured in two different production environments)!

Production Environment 1
OLD -- Elapsed: 00:00:07.01
NEW -- Elapsed: 00:00:00.06

Production Environment 2
OLD -- Elapsed: 00:00:19.06
NEW -- Elapsed: 00:00:01.06

Notice in the test output below how the LIO statistics for both the original and new SQL tests are identical. The plans are very similar as well. But, the big difference appears to be the time saved by removing the extra work required by the sum(case...) constructs.

The moral of the story here is that when writing SQL, you need to consider many different things and always make sure that you attempt to write the code to do the least amount of work possible to get the result you desire.

I say this to students in class all the time - Don't do work you don't have to do!

You can find the details of the tests (conducted on a 10.1 database) here.

Monday, November 13, 2006

Hotsos Education jumps into blogging

The folks at Hotsos Education are making the leap into the blog world today. We'd like to share our adventures as we travel from place to place teaching our Oracle performance optimization curriculum and meeting and greeting lots of great folks along the way.

This blog will be mostly about life on the road, people we meet and things we learn along the way. It's pretty amazing at how much we learn as we teach and we thought it would be fun to share some of the adventures with you.

So, come along for the ride!