Monday, April 21, 2008

It's a Matter of Time

I've been thinking a lot lately about my recent failed deployments.

How did I get so sloppy?

I'm not one to make excuses, but I would say there are some mitigating circumstances at least. Time being one of them.

So I got out my trusty calculator (SQL*Plus), and ran the numbers.

From August 26, 2007 through March 30, 2008, I've worked 1802 hours. Of that, 118 were PTO or holiday, which brings the total down to 1784. For perspective, a work year of 8 hours per day comes out to 2080 hours a year.


VAR HOURS NUMBER;
EXEC :hours := 1784

1 SELECT
2 ROUND( ( :HOURS / 2080 ) * 100, 1 ) per_of_tot_year_hours
3* FROM DUAL
ETL_WRK@ORA10GR2>/

PER_OF_TOT_YEAR_HOURS
---------------------
85.8

Cool! Only 86% of my hours in a little over 6 months!

Obviously, this is not a good thing.

Further breaking the numbers down:


VAR C VARCHAR2(10);
EXEC :C := '26-AUG-07';

SELECT
start_day,
end_day,
days_between db,
SUM( business_days ) bd,
ROUND( ( :hours / days_between ), 1 ) hpd,
ROUND( ( :hours / ( days_between / 7 ) ), 1 ) hpdw,
ROUND( ( :hours / SUM( business_days ) ), 1 ) hpwd,
ROUND( ( :hours / SUM( business_days / 5 ) ), 1 ) hpww
FROM
(
SELECT
start_day,
end_day,
TRUNC( end_day - start_day ) days_between,
start_day + rownum dayof,
( CASE
WHEN TO_CHAR( start_day + rownum, 'D' ) IN ( 2, 3, 4, 5, 6 ) THEN
1
END ) business_days
FROM
dual a,
(
SELECT
TO_DATE( :c, 'DD-MON-YY' ) start_day,
TO_DATE( '30-MAR-08', 'DD-MON-YY' ) end_day
FROM dual
) b
CONNECT BY LEVEL <= TRUNC( end_day - start_day )
)
GROUP BY
start_day,
end_day,
days_between
/

START_DAY END_DAY DB BD HPD HPDW HPWD HPWW
---------- ---------- ------ ------ ------ ------ ------ ------
08/26/2007 03/30/2008 217 155 8.2 57.5 11.5 57.5

DB = Days Between
BD = Business Days
HPD = Hours Per Day
HPDW = Hours Per Day/Week
HPWD = Hours Per Work Day
HPWW = Hours Per Work Week

The scary part is that I am not very diligent about entering my time. It's probably short anywhere between 5 and 10%.

I'm not the only one working these kinds of hours either. I know for a fact there are others.

Do you think this plays a role in my failed deployments?

4 comments:

Anonymous said...

Your last query in the article is definitely one of the nerdiest things I've seen.

You may want to hint to your employee that they should hire another DBA or delay few projects.

oraclenerd said...

I keep trying to do just that.

Actually, I (sadly) don't mind it all that much. I love what I do.

I do need to put things in perspective though, two small children whose childhood I don't want to miss.

I think most of my hours are at night, so it doesn't affect my family life all that much (though I'm exhausted come the weekend).

^
|
|
That's me rationalizing things...

Anonymous said...

Loving what we do is a huge problem, and a job that does not end at 5pm does not help.

I work for 8 hours a day.
The additional 8 hours I spend playing with Oracle are a hobby :)
(For some reason my husband doesn't agree that these are two different things)

oraclenerd said...

I wish I had more time to play...The past year there hasn't been a lot of it. On the off occasion I do have time, I mix it in with work (see Asynchronous CDC Autolog articles).

It all hearkens back to the day when I was caught surfing the web (a break from Oracle Reports). My boss gave me a hard time and from that point on, when I needed a break, I would read AskTom...for fun.