Tuesday, May 19, 2009

Ups and downs with phone conferences

The joy of attending phone conference increases when in the conference room
  • an old, not conference-ready phone without any noise cancellation is used,
  • a laptop with its fan and a person frequently typing is placed next to the phone,
  • everybody else is trying to sit as far as possible away from the phone,
  • everybody is doing side conversations,
  • and the person in charge is mumbling softly into the phone.
This can be topped by another attendee using an amplifier shouting into the phone. Now, if you had a headset on and had raised the volume to understand the quiet, mumbling person, your ear quits for a while and you hear as much as the two fellows in this IBM video. How are your phone conferences?

Friday, May 15, 2009

db2top: What's going on?

DB2 has lots of good stuff, and lots of hidden gems. One of them is db2top (it was alphaWorks before) which kind of sneaked in via fixpacks to V8.1.17 a.k.a V8.2.10, to V9.1.6, and to V9.5.2. If you know the "top" command from your UNIX system, you already have a general idea of what db2top is:

The db2top command provides a unified, single-system view of a multi-partition database or single-partition database on the AIX®, Linux® and Solaris operating systems. It can be used to quickly identify global problems, or specific database partition problems in the system. By combining snapshot information from each database partition, the utility can provide a dynamic real-time view of a running DB2® system.
db2top provides quick overview of tablespace, bufferpool, session, and other activities. It allows to capture snapshots over time and then automatically analyze them for performance. All this is provided through a simple-to-use text interface.

If you want to know more about db2top, I recommend to start with this developerWorks article and of course to visit the DB2 Information Center for the command details.

Wednesday, May 13, 2009

Friedrichshafen, Dornier, Herschel, Planck, Hubble, Zeppelins, and Codernauts!

In the past I have written a couple times about Zeppelins and their role in Friedrichshafen and the connection to the Bay Area (my former home). Today, it is time to extend the Zeppelin stories to Dornier, one of the many spin-offs of the early Zeppelin company. Dornier went through several mergers/transitions and many assets are now part of EADS / Astrium (still following me?).

Tomorrow, an Ariane 5 will carry two satellites, named Herschel and Planck, into space (follow the live video stream). Parts of it have been developed and built at Astrium in Immenstaad (Friedrichshafen) and many in the Friedrichshafen area are following that event with excitement.

What's missing? The link to Hubble which is undergoing repair again. The Faint Object Camera on Hubble was built by Dornier with its roots in Friedrichshafen and the Zeppelin. Both Hubble and Herschel are/will be used to look deep into our Universe. And that reminded me about something (very) old: Codernauts! Enjoy the video.

Which payment is greener: Cash or Credit?

The other day I was reading about the energy consumed and CO2 produced for each Google search. Energy efficiency is a hot topic and a lot of numbers (and hot air) are produced. Energy efficient data centers, green computing/green IT, household energy consumption, and much more is what is discussed in the news, IBM's theme is the Smarter Planet.

I am certainly interested in adding CO2 and energy metrics to database benchmarks like TPC-C, TPC-H, and also TPoX. But I am much more interested in the fundamental questions of daily life: Cash or credit (or in the US still check)? Not just only which is faster at the checkout, but what is greener? How much total energy is necessary to pay with cash and how much for paying with a card, including the post-processing?

Tuesday, May 12, 2009

DB2 9.7 (Cobra) for extended vacations?!

One of the things you have to adjust to when moving from Germany to the US or back is the number of vacation days. I had a hard time explaining to friends and family why I - with a Ph.D., work experience, a contract with 28 vacation days and plenty of public holidays - would accept a position in the US with only 10 vacation days and few holidays. After arriving in the new place, it took a while to figure out how to live with fewer vacation days (and the secret behind it).

Now, after moving back to Germany and suddenly HAVING to spend 30 vacation days a year it also requires some mental changes. You have to plan ahead and decide when to take vacation because you don't want to end up in November with two months off in a row (which does not work anyway). Having vacation days can be hard.

In the past, I got to hear discussions about how efficient different societies or workplaces are and different speed of work, why in some countries there is more or less vacation, and different strategies on how to deal with it. That's not what I wanted to discuss today.

I was reminded about the vacation discussions over the last week when we compared the DB2 9.5 and DB2 Cobra performance for a customer warehousing workload. Many queries completed on Cobra in only 80% of the time it took on DB2 9.5, some even only needed 30% of the previous time. The improvements can be attributed to the compression of temp tables and indexes, local index support for range-partitioned tables and general runtime enhancements. I was and I still am impressed with the results. And it got me thinking about what that customer and its employees could do as a consequence of the outstanding results. They could either do more in less time now or enjoy some additional days off. What would you do...?

Friday, May 8, 2009

Pass it to me, no, wait, to me! (Parameter passing from SQL to XQuery and back)

Many of you know that parameters can be passed from the SQL context to the XQuery context. The functions XMLEXISTS, XMLQUERY, and XMLTABLE all have a "passing" clause that can be used to make constants, columns, or parameters available for XML-related expressions:

WHERE XMLEXISTS('$d/employee[@id=$id]' PASSING doc AS "d", CAST (? AS INTEGER) AS "id")

There were significant enhancements to parameter passing starting from DB2 9.5. Even though it was passed to the field (pun intended) it has not reached everybody. A good starting point to read more about what is possible is the document "Passing parameters between SQL statements and XQuery expressions" in the DB2 Information Center.

Let me start with a simplification that was introduced. It allows to leave out the passing clause for column names. In that case the case-sensitive column name must be used directly in the XQuery expression. The above example could be simplified as follows:

WHERE XMLEXISTS('$DOC/employee[@id=$id]' CAST (? AS INTEGER) AS "id")

Only the parameter marker is passed in now, the column name "DOC" is used instead of the previously named variable "doc". So much for the SQL to XQuery passing.

In some cases, you also want to transfer some information from the XQuery context to SQL. This is not a standard XQuery problem because DB2 with its pureXML functionality is a bilingual, hybrid database system and unique in its XML support. So far you could already evaluate SQL expressions from within XQuery by calling the db2-fn:sqlquery function. This function has been extended to allow you to specify parameters and a function named PARAMETER() was added to SQL to receive those values in the SQL context.

values(xmlquery('for $p in db2-fn:sqlquery("select xmlrow(tabschema, tabname) from syscat.tables where tabschema=PARAMETER(1)","HENRIK") return $p'))

In the above example we return as XML the fully qualified table names for all tables in the schema "HENRIK". Try it yourself by replacing "HENRIK" with your username or "SYSIBM". You notice how PARAMETER(1) fetches the passed value which was - separated by a comma - specified as argument of the sqlquery() function.

Some time has passed since I started this blog entry. Have a nice weekend!

Wednesday, May 6, 2009

Modeling messed-up Mashups means more money mapReduced?!

The title of this blog entry could be a headline in a regular IT or financial journal. Or it could indicate that someone is trying to pull your leg.

Anyway, the point I wanted to make is that as IT professional it is hard to keep up with all the technologies that are currently in or will be in. Many of us already know about developerWorks, IBM's resource for developers and IT professionals. However, probably most of us stick to what they already know, in my case Information Management- or DB2-related topics and offerings. But when you start from the top and take a look at what developerWorks offers in addition to your favorite topics, you will see it is a good resource for keeping up on IT knowledge. You will learn the difference between mash up and mess up and between map and shrink vs. map reduce.

Now add in alphaWorks, IBM's place to let everyone see and experiment with technologies that are not even products, and you are able to keep up and put some sense in some weird headlines.

What's missing is only some quiet minutes. I already instructed my wife to tell everyone asking for me I am over at "spouseWorks" and not to disturb me...

Tuesday, May 5, 2009

DB2 pureXML: All the XQuery features you need

One question I hear a lot is: What XQuery features are supported by DB2 pureXML? My standard answer is "All the features you need!". But what are they?

XQuery itself is built on top of XQuery/XPath Data Model (XDM), the XQuery and XPath Functions and Operators, and some other stuff. The two referenced specs alone are already complex by themselves and guarantee hours of reading fun. A different way of reading through XQuery, its syntax and functions is to go to the DB2 Information Center and its XQuery Reference. It provides a really good introduction into XQuery from the DB2 or database angle. The documentation includes a comparison of SQL and XQuery, an overview of the XQuery data model, and of course the description of expressions, functions, and all the other supported features.

After you are done reading AND trying it out, let me know if you don't agree on "DB2 pureXML: All the XQuery features you need"...


Related Posts with Thumbnails