Wednesday, April 20, 2011

Bragging on my bro

Brendon finished the SLC Half Marathon in 1:57:32
I hope I don't embarrass Brendon here, but I'm feeling a little honored to have this guy as my brother in law.  Two years ago if he opened a fortune cookie and it read "You will run a half marathon in under 2 hours", he probably would have laughed and said, "Yeah right!".

But as I was thinking about all the obstacles he's overcome, and his willingness to try something like running which at first is pretty painful and takes some mighty willpower to keep doing day after day when it hurts, I thought of a motto that seems to fit him:  "Busting down barriers, and hurdling all excuses."

In my opinion, those are just a couple of problems that people have with losing alot of weight and getting into shape. (Speaking from experience being huge and out of shape) I'm sure he's feeling so much happier finding a new life of fitness, healthy eating, and looking good!

Way to go Brendon!  Running your first half marathon should definitely be a confidence booster for Ragnar!

Tuesday, March 29, 2011

Work related post - Don't use NOT EXISTS in query

Ever need to look for missing data? For instance, the table TLD_HEADER is the header for TLD_SALES_DATA, TLD_MGR_OVERRIDE, TLD_REASON, and TLD_TENDER_DATA. Originally there was no foreign key on these child tables to TLD_HEADER so after years of collecting data, there were some cases where TLD_HEADER records did NOT EXIST for the other TLD_ records.

 Once we made it a true parent of the other TLD_ tables, we had a problem and had to create a script to create the TLD_HEADER records in order for the delta that creates the FK to run successfully. (Create_TLD_Header.sql)

This query was used to identify missing TLD_HEADER records from TLD_SALES_DATA:

select distinct site_no, tran_dt, reg_no, tran_no
from tld_sales_data tsd
where NOT EXISTS (select *
                                     from TLD_HEADER
                                   where site_no = tsd.site_no
                                       and tran_dt = tsd.tran_dt
                                       and reg_no = tsd.reg_no
                                       and tran_no = tsd.tran_no);
However in a customer's environment it was taking 7 hours and 53 minutes.

A sql guru looked at the script and suggested this query instead:

SELECT /*+ index_ffs(tsd TLD_SALES_DATA_PK) index_ffs(th TLD_HEADER_PK) */
distinct tsd.site_no, tsd.tran_dt, tsd.reg_no, tsd.tran_no
FROM tld_sales_data tsd, tld_header th
WHERE th.site_no(+) = tsd.site_no
AND th.tran_dt(+) = tsd.tran_dt
AND th.reg_no(+) = tsd.reg_no
AND th.tran_no(+) = tsd.tran_no
AND th.rowid is null;
Very interesting. Do an outer join, but where the th.rowid is null? That's kind of weird. But believe it or not this query picked up the same number of records, but did so in 26 minutes. That's 18 times faster! How embarrasing. So if you need to locate records that DON'T exist, use this method where an outer join is used instead of an inner join with a NOT EXISTS!

Wednesday, March 9, 2011

Russell Hantz gets farted off Survivor

Russell "the best player ever to play Survivor" was finally muscled out of the game and none too soon. Now I can enjoy the show and not hear this guy run his mouth about how awesome he is.

Anyone else glad or does anyone actually like this guy or respect how he played?

Friday, February 4, 2011

Uncle Karl's interview on the Radio

I found out about an hour too late yesterday that my uncle Karl was on the radio with X96.  Thank goodness they offer free podcasts.  So if you missed it and want to hear him discuss the ins and outs of being a football referee, you can listen to it here:



Nice job Karl!

Saturday, January 22, 2011

Posting from my nook

I have been looking at ereaders since Matt D at work gave
me a demo of his kindle. I ended up getting a nook which
is similar and includes 3G free.

bIt isnt the best interface for web browsing,

Monday, January 10, 2011

These Jammies are Fatastic!

After I gave Oliver a haircut I put him in a warm shower.  After Sam's turn getting a haircut I put Sam in and got Oliver out of the shower.   Got him dried up and told him to go get some pajamas out of the closet.  He came running back and threw the jammies at me to help him get them on.  He said, "I love these jammies Dad!  Their Fat-tastic!".

Saturday, January 1, 2011

I know its a little cold outside, but c'mon guys! Really?

So this last week I pulled in to work to see a guy get out of his BMW.  He had a scarf loosely wrapped around his neck and the wind was about to blow it off a couple times.  He struggled with it to get it to stay around his leather jacket.

Then I park my car and I see another guy get in to his Range Rover and yes he too is wearing a scarf that is also wrapped just once around his neck and dangling down to his pants.  Coincidence? Or are there more effeminate men in SLC than I thought?  Scary.

If you're a guy wearing a scarf (and don't want people questioning your manhood), it better be like 40 below and you also better be wearing a coat, gloves, winter hat, boots and covering the scarf inside your bulky coat.

If you're a woman and you have eyes for a guy who is wearing a loose scarf as a fashion accessory, I question the proper linkage in your brain.  Because he's very likely the type of guy who would probably leave you for another man.  Just sayin.

Stay warm, and Happy New Year.