Well, I am back from vacation. 8 days of no technology (well..other than digital cameras and a Sony picture vault mini-disk photo storage device.) I enjoyed Cancun and got to do several dives while I was there (six in all) of varying levels of difficulty. I dove my first two-tank dive concurrently with my wife and son-in-laws resort certification single tank dive. A double tank dive means two-one tank dives with a short interval on the surface between them. A resort certification is a 1-2 hour introduction to scuba with a pool session to help master basic skills and usually followed by a single tank “real” dive to no more than 30-40 feet of depth.
The first two-tank dive was a little bit of a disappointment due to the damage caused the reef from the large storms last year, much of the coral was showing signs of bleaching and there were many broken coral bits lying around. Usually the sea fans have a healthy purple color to them, the ones on the first dives were brown and looked rather ragged. There were lots of small juvenile fish, but not many large, mature fish. This first dive was on the Cancun side. We saw no rays, moray eels or other “staples” of a typical dive in the Caribbean.
The second two-tank dive was on the Cozumel side and I did it with my wife and son-in-law, which of course meant I couldn’t do the more advanced wall (deep) dive but had to stick to the shallow divemaster/instructor led dives. The coral looked healthier and there were more mature fish to be seen, but it was still not as good as I remembered from before the storms of a year ago. The highlight was a small octopus that we caught a glimpse of who was sleeping inside a coral formation (octopus are nocturnal by nature and sleep for the most part during the day.) The divemaster also showed my wife one of the small long-legged shrimp and let her hold it.
On the third two-tank dive I got to go on an advanced wreck/drift dive. The first dive was to about 80 feet deep on the C-58, the General Anaya, a sunken mine sweeper. The wreck had been a single site before the two large storms of 2005, but the first storm twisted the wreck in half and the second moved the bow about 100 yards away from the stern were it lays on its side with the bow now facing the same direction as the stern. On the stern section we did a swim through. As we swum though the upper structure (we didn’t do a penetration, we were in sight of an externally sun lit exit at all times) I couldn’t help but think back to the USS Haleakala, AE25, the first ship I was posted to when I was in the Navy. Although the two ships were totally different in purpose and design, the internal corridors where eerily similar, especially when we came upon a ladder (a set of steps) going up to an upper level and I noticed that they were identical in construction to those I used hundreds of times on the Haleakala.
Once we were done with the swim-through we followed the divemaster to the bow section. In station over the top of the bow were about a dozen greater barracudas. Since the bow was laying on its port (left) side, we didn’t do a swim-through (it also looked pretty ragged from being rolled/slammed along the bottom by the storm) we swam around the torn section behind it (to the topside, the keel was pointing back toward the stern section) and swam up to the bow sprint. We could see the current whipping material past, but we were shielded from it by the wreck, I was relieved when we retraced our path going behind the wreck instead of trying to swim across the current. However, this relief was short lived.
Once we got back to the section of the hull where it had been torn in half, we pointed into the current and started the swim to a reef that was several hundred yards away (at least it seemed that far in the current) we were moving on a diagonal to the current so we weren’t directly fighting it, but it was a bit of a workout for a 50 year old. We got to the reef structure and immediately saw a small sea turtle (about 2-3 foot shell size) who allowed us to photograph it and then nonchalantly swam away. We also saw a batfish (who uses two large, fleshy looking fins located on its top and bottom sides to move through the water) and a small nurse shark. This was the healthiest reef ( at 50 feet deep or so) with the largest fish and best looking coral. At one point we came up over a coral head and in a current-protected area saw a school of thousands of yellow-striped grunts that allowed us to swim in amongst them showing little fear of us.
The second dive was a drift dive over a reef. Again, the coral on this dive (at about 50 feet) was in much better condition that at the other sites and there were more mature fish and healthy coral and sea fans.
Overall the dives were fair to good, however, I have to give AquaWorld some negative feedback, my son-in-laws primary stage on his regulator (the primary takes the 3000 PSI air in the tank and drops it down to 140 PSI to feed to the secondary stage that you breath through and the various fill hoses you may use for your equipment such as the BCD or a drysuit) gave out at 20 feet down and stopped giving air, even though his SPG (submergible pressure guage) indicated he had 500 PSI in his tank. This wouldn’t have been a real problem if the dive masters assistant had been where he should have been to provide a spare air (octo) but instead my son-in-law was basically by himself , luckily we were only in 20 feet of water at the time and he had just exhaled out all his breath, he basically did a free ascent to the surface, but I don’t think he remembered to try to blow out all the way up. Had he not just done a complete exhale, he might have severely injured himself from a lung over-expansion injury. Usually first (or primary) stage failure, especially of this type, is due to allowing saltwater to get into the first stage causing the corrosion of the components and possible buildup of salt crystals which can jam air pathways in the internals of the regulator. Once on the surface the regulator breathed OK and the tank indicate 1000 PSI (remember that the pressure gage hooks up through the first stage so anything that blocks the primary air intake port will affect the pressure gage and the primary stage.) My son-in-law also experienced dump valve failure on his rented BCD on his second dive, another failure that shows lack of proper equipment maintenance. Since he was only in 20-30 feet of water, again, it wasn’t a big issue, but had he been a more experienced, certified diver and the condition occurred at 80 or 90 feet down, it may have resulted in an uncontrolled ascent and possible DCS (decompression sickness) hit.
These types of problems are why I am a strong supporter of owning at least your own regulator and BCD where you know the stuff is maintained properly.
I watched the divemaster on one of my dives take my BCD/regulator assembly from the expended tank and place it on the full tank for my second dive. I went over to record the pressure for my log and when I turned on the tank valve, could hear the distinct hiss of a air leak through the o-ring seal of the tank, when he did the pressure check he appearently hadn’t heard it. I pointed this out and he removed my rig to replace the o-ring on the tank valve. While he went to get a new o-ring, he just left my regulator lying where it was in a splash area from the forward motion of the boat through the waves, with the dust cap off. The dust cap keeps dust and debris, as well as water, from entering the first stage. I went over and replaced the dust cap on the regulator myself. On another dive where I had let them rig the second tank, they had neglected to remove the masking tape they used to cover the tank valve opening and had just put my rig over the top of it, why it didn’t leak like a sieve I don’t know, if they did this all the time, it could also explain the failure of my son-in-laws regulator as sections of the masking tape would plug up the filter on the intake port.
We also took a sub-sea and snorkel tour with the entire group of us trooping over to Paradise Island. The sub-sea adventure is little more than a more sea-worthy version of the old Nautilus ride at Disneyland. My major complaint was that the seating was designed by the same folks who designed the windows for airplanes, if you where five foot tall it was perfect, otherwise it required you to crane your neck uncomfortably for the entire tour to see out. They also went too fast, I understand having to maintain steerage, but they seemed to rush it a bit. The snorkel tour which followed was more like the coral 500 race as the guide seemed more interested in getting finished with his part of it rather than allowing us a leisurely snorkel through the reef.
The best thing we did with Aquaworld was the fishing trip my son-in-law and I took with them. Of course of the 6 hour fishing trip, probably an hour and a half was spent getting out and back and another hour was spent watching the Captain and his Mates catch the bait. However, even though we only fished for 3 hours out of the 6, we (there were 5 of us on the charter) caught 25 amberjack with the smallest at a bout 10-15 pounds the largest at about 30) and two Rock fish (one at about 10 pounds the second at 30 pounds). Needless to say, had we had a complete 6 hours of just fishing, I probably wouldn’t have been able to raise my arms. I was a little disappointed to hear we couldn’t get any of the meat because of the warmth of the water causing certain types of poisonous algae to be present and certain parasites to be in the fish (he showed us some worms he had removed from one of the fish.) I can’t really imagine the water temps being that radically different (lower) in the months with “r”s in them that far south, but supposedly it was an issue. The Captain said they gave the fish to poor who would spend days preparing the meat to make it edible. With our catch we must have fed 10-15 families if what he said was the truth and I have no reason to doubt him.
We also did some shopping at the various markets, Usually you can get some really good bargains if you are willing to haggle a bit, but I noticed overall the prices where quite a bit higher than my visit there 2 years ago and higher than the prices in the Cabo San Lucas area last year.
So now it is back in the saddle. Hopefully next entry I will have some juicy Oracle tidbits for you.
Mike
Mike Ault's thoughts on various topics, Oracle related and not. Note: I reserve the right to delete comments that are not contributing to the overall theme of the BLOG or are insulting or demeaning to anyone. The posts on this blog are provided “as is” with no warranties and confer no rights. The opinions expressed on this site are mine and mine alone, and do not necessarily represent those of my employer.
Tuesday, July 18, 2006
Wednesday, July 05, 2006
Oracle Timestamp Math
Had in interesting query from a client today. They have been storing start and stop times from a process in Oracle TIMESTAMP format and now want to get milliseconds out of the difference between the two timestamps. Seems pretty easy right?
Ok, first we create a table with two TIMESTAMP columns and an index value:
SQL> select * from check_time
SQL> /
TIM_COL1 TIM_COL2 TIME_INDEX
---------------------------- ---------------------------- ----------
05-JUL-06 05.00.42.437000 PM 05-JUL-06 05.01.54.984000 PM 1
05-JUL-06 05.03.14.781000 PM 05-JUL-06 05.03.39.328000 PM 2
Now, if we were just using DATE we could subtract the dates and use the proper multiplier to convert the fractional return to the proper time unit. However when we subtract TIMESTAMPs:
SQL> select tim_col2-tim_col1 from check_time;
TIM_COL2-TIM_COL1
------------------------------------------------
+000000000 00:01:12.547000
+000000000 00:00:24.547000
We get a hideous time interval upon which you can’t do math:
SQL> select sum(tim_col2-tim_col1) from check_time;
select sum(tim_col2-tim_col1) from check_time
*
ERROR at line 1:
ORA-00932: inconsistent datatypes: expected NUMBER got INTERVAL
So what can be done?
In steps the new interval functions that allow extraction of timestamp components, such as DAY, HOUR, MINUTE and SECOND…but wait there is no MILLISECOND! Of course a short trip to the documentation shows that the SECOND has a fractional component that allows us to specify the number of decimals after the second thus giving us access to the milliseconds, even down to microseconds in the interval value, look here:
SQL> l
1* select sum(extract(second from tim_col2)-extract(second from tim_col1))*1000 from check_time
SQL> /
SUM(EXTRACT(SECONDFROMTIM_COL2)-EXTRACT(SECONDFROMTIM_COL1))
------------------------------------------------------------
37094
Well, that is more like it! So now we can get the milliseconds between and do the aggregation functions such as sum() and avg() on the results.
Ok, first we create a table with two TIMESTAMP columns and an index value:
SQL> select * from check_time
SQL> /
TIM_COL1 TIM_COL2 TIME_INDEX
---------------------------- ---------------------------- ----------
05-JUL-06 05.00.42.437000 PM 05-JUL-06 05.01.54.984000 PM 1
05-JUL-06 05.03.14.781000 PM 05-JUL-06 05.03.39.328000 PM 2
Now, if we were just using DATE we could subtract the dates and use the proper multiplier to convert the fractional return to the proper time unit. However when we subtract TIMESTAMPs:
SQL> select tim_col2-tim_col1 from check_time;
TIM_COL2-TIM_COL1
------------------------------------------------
+000000000 00:01:12.547000
+000000000 00:00:24.547000
We get a hideous time interval upon which you can’t do math:
SQL> select sum(tim_col2-tim_col1) from check_time;
select sum(tim_col2-tim_col1) from check_time
*
ERROR at line 1:
ORA-00932: inconsistent datatypes: expected NUMBER got INTERVAL
So what can be done?
In steps the new interval functions that allow extraction of timestamp components, such as DAY, HOUR, MINUTE and SECOND…but wait there is no MILLISECOND! Of course a short trip to the documentation shows that the SECOND has a fractional component that allows us to specify the number of decimals after the second thus giving us access to the milliseconds, even down to microseconds in the interval value, look here:
SQL> l
1* select sum(extract(second from tim_col2)-extract(second from tim_col1))*1000 from check_time
SQL> /
SUM(EXTRACT(SECONDFROMTIM_COL2)-EXTRACT(SECONDFROMTIM_COL1))
------------------------------------------------------------
37094
Well, that is more like it! So now we can get the milliseconds between and do the aggregation functions such as sum() and avg() on the results.
Saturday, July 01, 2006
Diving A Drysuit
I am sure almost everyone has heard of a wetsuit. A wetsuit is basically a skintight neoprene rubber suit that divers wear to shield them from heat loss. A wetsuit shields the diver from heat loss by controlling the amount of water that comes in contact with the diver, limiting it to just enough to allow the divers own warmth to keep the water warm. The thickness of the neoprene determines how cold the water outside the suit can be and the diver still be comfortable. About the maximum thickness is 7 mm (about ¼ inch) and that will protect a diver in water in the range of 50-60 degrees.
50 to 60 degrees you say, that doesn’t seem so cold…well…the water transfers heat at 20 times the rate that air does. At 50 to 60 degrees a person will go hypothermic in a matter of minutes without a proper exposure suit. At 70 degrees you can get hypothermia as well, it may take a bit longer.
Now, what if the water is colder than 50-60 degrees? You could go with thicker wetsuits but then your mobility will be greatly restricted. The answer is called a drysuit. As its name implies a drysuit has seals that eliminate all water movement, that is, no water gets in, hence its name, drysuit. A drysuit provides no insulation, the diver must wear essentially, “long underwear” that provides the needed insulation, keeping the diver warm.
I recently got to dive a drysuit, the one I purchased was a great deal from www.divetank.com. I highly recommend them by the way, I purchased a Bare Nex Gen 200Z 2006 drysuit, it is made from trilaminate material, very light weight, very flexible and very easy to don and remove. Divetank provided the suit, neoprene dive hood, fill hose and the bag to carry it all for less than $650.00, I needed it right away so I had to fork over a bit for the next day shipping, but considering most drysuits run greater than $1,200.00 this was an outstanding deal.
First I prepared the buoyancy control device (basically an inflatable vest), the regulator and the air tank. You do this first because if you put on the full suit before setting up the rest of your equipment you risk getting heat stroke or becoming dehydrated while doing the setup operations.
To prepare the suit for use, first you must be sure the seals (in this suit at neck and wrists) are properly trimmed, otherwise you could choke, trigger various physical problems, or cut off circulation. Most seals are either neoprene or lycra (rubber). The rubber seals are marked with rings that provide cutting guidelines. For my suit I had to remove 1 ring from the neck seal which I did by placing the neck seal over a scuba bottle and then carefully following the ring boundary with my dive knife (which is razor sharp.) The wrist seals fit without trimming. A hint (provided by a fellow diver), use mild baby shampoo as lubricant to allow your hands to slip easily into the seals. Also, before each dive, you treat the zipper seal with bees wax to help seal it.
Once the seals fit I put on my lycra dive skin, the fleece under suit (provided with the suit) rather like a fleece jogging suit, my dive socks, then donned the drysuit. Then, before pulling the neck seal over my head and sealing the suit up, I put on my neoprene over booties over the soft boots that were part of the drysuit. My suit is a rear entry suit meaning the sealing zipper is on the back. My suit has the zipper across the shoulders, requiring a second diver to help. My dive buddy closed the zipper and seated the zipper pull into the seal.
Next, you put on your weight belt if you are using one (some BCDs have built in weight pockets, and some drysuit divers prefer a weight harness instead of a weight belt) and then don your BCD/regulator/tank assembly. Since we were diving a quarry (Dive Haven, White Georgia) we carried the mask and fins down to the waters edge to put them on, however, don’t, as I did, drop your second fin into deep water while putting on your first, necessitating your dive buddy do a search and recovery operation!
I also just bought a new mask strap, it has the full neoprene pad on the back and rather than rubber or lycra straps, uses nylon straps. I had problems with mask flooding as a result until we made sure that the mask was properly tightened and that no neoprene from the dive hood was stuck under the edge of the mask seal. After the mask issue was dealt with the dive went without a hitch.
We then did several ascents and descents to allow me to get a handle on using the combination of the drysuit and BCD to control suit squeeze and buoyancy. One issue many new drysuit divers trained using PADI have is that the PADI material says to use the drysuit to control buoyancy. This is incorrect.
You see the drysuit has an attached fill line from the low-pressure side of the first stage regulator, this is supposed to be used to relieve what is known as suit squeeze. Suit squeeze is caused by the pressure of the external water pressing the suit up tight against your body, a short burst of air provides for a thin layer of air in the suit to eliminate this. However, the suit should not be used for buoyancy control! You still use the BCD just as with a wetsuit. The suit also has an outlet valve that controls how much air is retained in the suit, it ranges from all the way shut to all the way open and adjusts by clicks, we set mine to 4 clicks off closed.
Once I got at least a beginning understanding of this needed control (after 5 ascents/descents) we did a normal dive at about 30-40 feet (51 degrees) and let me report I was comfortable except for my hands, I forgot my 5mm gloves and only had my light weight reef gloves to wear for the dive.
Overall I enjoyed the dive, learned the fundamentals of drysuit diving and had a great day with the other members of the Lake Lanier Loonies (we are considered Loony because we dive Lake Lanier year round.) I am also looking forward to my next drysuit dive (probably on July 4th.)
50 to 60 degrees you say, that doesn’t seem so cold…well…the water transfers heat at 20 times the rate that air does. At 50 to 60 degrees a person will go hypothermic in a matter of minutes without a proper exposure suit. At 70 degrees you can get hypothermia as well, it may take a bit longer.
Now, what if the water is colder than 50-60 degrees? You could go with thicker wetsuits but then your mobility will be greatly restricted. The answer is called a drysuit. As its name implies a drysuit has seals that eliminate all water movement, that is, no water gets in, hence its name, drysuit. A drysuit provides no insulation, the diver must wear essentially, “long underwear” that provides the needed insulation, keeping the diver warm.
I recently got to dive a drysuit, the one I purchased was a great deal from www.divetank.com. I highly recommend them by the way, I purchased a Bare Nex Gen 200Z 2006 drysuit, it is made from trilaminate material, very light weight, very flexible and very easy to don and remove. Divetank provided the suit, neoprene dive hood, fill hose and the bag to carry it all for less than $650.00, I needed it right away so I had to fork over a bit for the next day shipping, but considering most drysuits run greater than $1,200.00 this was an outstanding deal.
First I prepared the buoyancy control device (basically an inflatable vest), the regulator and the air tank. You do this first because if you put on the full suit before setting up the rest of your equipment you risk getting heat stroke or becoming dehydrated while doing the setup operations.
To prepare the suit for use, first you must be sure the seals (in this suit at neck and wrists) are properly trimmed, otherwise you could choke, trigger various physical problems, or cut off circulation. Most seals are either neoprene or lycra (rubber). The rubber seals are marked with rings that provide cutting guidelines. For my suit I had to remove 1 ring from the neck seal which I did by placing the neck seal over a scuba bottle and then carefully following the ring boundary with my dive knife (which is razor sharp.) The wrist seals fit without trimming. A hint (provided by a fellow diver), use mild baby shampoo as lubricant to allow your hands to slip easily into the seals. Also, before each dive, you treat the zipper seal with bees wax to help seal it.
Once the seals fit I put on my lycra dive skin, the fleece under suit (provided with the suit) rather like a fleece jogging suit, my dive socks, then donned the drysuit. Then, before pulling the neck seal over my head and sealing the suit up, I put on my neoprene over booties over the soft boots that were part of the drysuit. My suit is a rear entry suit meaning the sealing zipper is on the back. My suit has the zipper across the shoulders, requiring a second diver to help. My dive buddy closed the zipper and seated the zipper pull into the seal.
Next, you put on your weight belt if you are using one (some BCDs have built in weight pockets, and some drysuit divers prefer a weight harness instead of a weight belt) and then don your BCD/regulator/tank assembly. Since we were diving a quarry (Dive Haven, White Georgia) we carried the mask and fins down to the waters edge to put them on, however, don’t, as I did, drop your second fin into deep water while putting on your first, necessitating your dive buddy do a search and recovery operation!
I also just bought a new mask strap, it has the full neoprene pad on the back and rather than rubber or lycra straps, uses nylon straps. I had problems with mask flooding as a result until we made sure that the mask was properly tightened and that no neoprene from the dive hood was stuck under the edge of the mask seal. After the mask issue was dealt with the dive went without a hitch.
We then did several ascents and descents to allow me to get a handle on using the combination of the drysuit and BCD to control suit squeeze and buoyancy. One issue many new drysuit divers trained using PADI have is that the PADI material says to use the drysuit to control buoyancy. This is incorrect.
You see the drysuit has an attached fill line from the low-pressure side of the first stage regulator, this is supposed to be used to relieve what is known as suit squeeze. Suit squeeze is caused by the pressure of the external water pressing the suit up tight against your body, a short burst of air provides for a thin layer of air in the suit to eliminate this. However, the suit should not be used for buoyancy control! You still use the BCD just as with a wetsuit. The suit also has an outlet valve that controls how much air is retained in the suit, it ranges from all the way shut to all the way open and adjusts by clicks, we set mine to 4 clicks off closed.
Once I got at least a beginning understanding of this needed control (after 5 ascents/descents) we did a normal dive at about 30-40 feet (51 degrees) and let me report I was comfortable except for my hands, I forgot my 5mm gloves and only had my light weight reef gloves to wear for the dive.
Overall I enjoyed the dive, learned the fundamentals of drysuit diving and had a great day with the other members of the Lake Lanier Loonies (we are considered Loony because we dive Lake Lanier year round.) I am also looking forward to my next drysuit dive (probably on July 4th.)
Subscribe to:
Posts (Atom)