<?xml version='1.0' encoding='UTF-8'?><?xml-stylesheet href="http://www.blogger.com/styles/atom.css" type="text/css"?><feed xmlns='http://www.w3.org/2005/Atom' xmlns:openSearch='http://a9.com/-/spec/opensearchrss/1.0/' xmlns:georss='http://www.georss.org/georss'><id>tag:blogger.com,1999:blog-18371456</id><updated>2010-03-05T09:41:45.383-06:00</updated><title type='text'>DB2PORTAL Blog</title><subtitle type='html'>News, views, and items of interest on DB2 database management and mainframe systems.</subtitle><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/18371456/posts/default'/><link rel='alternate' type='text/html' href='http://www.db2portal.com/blog.html'/><link rel='hub' href='http://pubsubhubbub.appspot.com/'/><link rel='next' type='application/atom+xml' href='http://www.blogger.com/feeds/18371456/posts/default?start-index=26&amp;max-results=25'/><link rel='http://schemas.google.com/g/2005#feed' type='application/atom+xml' href='http://www.db2portal.com/atom.xml'/><author><name>Craig S Mullins</name><uri>http://www.blogger.com/profile/17077237739217901780</uri><email>noreply@blogger.com</email></author><generator version='7.00' uri='http://www.blogger.com'>Blogger</generator><openSearch:totalResults>221</openSearch:totalResults><openSearch:startIndex>1</openSearch:startIndex><openSearch:itemsPerPage>25</openSearch:itemsPerPage><entry><id>tag:blogger.com,1999:blog-18371456.post-7371949168131541055</id><published>2010-03-05T09:41:00.003-06:00</published><updated>2010-03-05T09:41:45.396-06:00</updated><title type='text'>This blog has moved</title><content type='html'>&lt;br /&gt;       This blog is now located at http://db2portal.blogspot.com/.&lt;br /&gt;       You will be automatically redirected in 30 seconds, or you may click &lt;a href='http://db2portal.blogspot.com/'&gt;here&lt;/a&gt;.&lt;br /&gt;&lt;br /&gt;       For feed subscribers, please update your feed subscriptions to&lt;br /&gt;       http://www.db2portal.com/atom.xml.&lt;br /&gt;  &lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/18371456-7371949168131541055?l=www.db2portal.com%2Fblog.html' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://www.blogger.com/feeds/18371456/7371949168131541055/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='https://www.blogger.com/comment.g?blogID=18371456&amp;postID=7371949168131541055' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/18371456/posts/default/7371949168131541055'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/18371456/posts/default/7371949168131541055'/><link rel='alternate' type='text/html' href='http://www.db2portal.com/2010/03/this-blog-has-moved_05.html' title='This blog has moved'/><author><name>Craig S Mullins</name><uri>http://www.blogger.com/profile/17077237739217901780</uri><email>noreply@blogger.com</email><gd:extendedProperty xmlns:gd='http://schemas.google.com/g/2005' name='OpenSocialUserId' value='03814325010211222227'/></author><thr:total xmlns:thr='http://purl.org/syndication/thread/1.0'>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-18371456.post-984073688385285413</id><published>2010-03-05T09:41:00.001-06:00</published><updated>2010-03-05T09:41:43.408-06:00</updated><title type='text'>This blog has moved</title><content type='html'>&lt;br /&gt;       This blog is now located at http://db2portal.blogspot.com/.&lt;br /&gt;       You will be automatically redirected in 30 seconds, or you may click &lt;a href='http://db2portal.blogspot.com/'&gt;here&lt;/a&gt;.&lt;br /&gt;&lt;br /&gt;       For feed subscribers, please update your feed subscriptions to&lt;br /&gt;       http://www.db2portal.com/atom.xml.&lt;br /&gt;  &lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/18371456-984073688385285413?l=www.db2portal.com%2Fblog.html' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://www.blogger.com/feeds/18371456/984073688385285413/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='https://www.blogger.com/comment.g?blogID=18371456&amp;postID=984073688385285413' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/18371456/posts/default/984073688385285413'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/18371456/posts/default/984073688385285413'/><link rel='alternate' type='text/html' href='http://www.db2portal.com/2010/03/this-blog-has-moved.html' title='This blog has moved'/><author><name>Craig S Mullins</name><uri>http://www.blogger.com/profile/17077237739217901780</uri><email>noreply@blogger.com</email><gd:extendedProperty xmlns:gd='http://schemas.google.com/g/2005' name='OpenSocialUserId' value='03814325010211222227'/></author><thr:total xmlns:thr='http://purl.org/syndication/thread/1.0'>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-18371456.post-8430566914193953627</id><published>2010-02-09T11:21:00.003-06:00</published><updated>2010-02-09T11:25:14.927-06:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='IBM'/><category scheme='http://www.blogger.com/atom/ns#' term='DB2 X'/><category scheme='http://www.blogger.com/atom/ns#' term='DB2 10'/><title type='text'>IBM Announces DB2 10 for z/OS Beta Program</title><content type='html'>IBM announced the beta program for the next version of DB2 today, now "officially" known as DB2 10 (no more DB2 X). It is a closed beta program that will begin on March 12, 2010. That means you have to be selected by IBM to participate.&lt;br /&gt;&lt;br /&gt;The announcement highlighted some of the areas of improvement to be delivered by DB2 10 for z/OS, and at the top of that list, to no one's surprise, is performance. DB2 10 promises to deliver out-of-the-box savings by improving operational efficiencies ranging from 5% to 10% out-of-the-box CPU savings for traditional workloads and up to 20% out-of-the-box CPU savings for nontraditional workloads.&lt;br /&gt;&lt;br /&gt;Other areas called out by IBM in the announcement include&lt;br /&gt;&lt;ul&gt;&lt;li&gt;Improved business resiliency through scalability improvements and fewer outages (planned or unplanned).&lt;/li&gt;&lt;li&gt;Schema evolution or data definition on demand as well as query performance manageability enhancements support improved availability.&lt;/li&gt;&lt;li&gt;New features such as hash access, index include columns, inline large objects, parallel index updates, faster single row retrievals, work file in-memory, index list prefetch, 64-bit memory enhancements, use of the 1 MB page size of the System z10, buffer pools in memory, access path enhancements, member clustering for universal table spaces, efficient caching of dynamic SQL statements with literals, improved large object streaming, and SQL procedure language performance.&lt;/li&gt;&lt;li&gt;Rapid application and warehouse deployment for business growth including improved concurrency for data access, data management, and data definition.&lt;/li&gt;&lt;li&gt;The ability avoid an outage by adding active log data to a subsystem.&lt;/li&gt;&lt;li&gt;Improved application and data warehousing support including temporal data, a 64 bit ODBC driver, currerntly committed locking, implicit casting or loose typing, timestamp with time zone, variable timestamp precision, moving sum, and moving average.&lt;/li&gt;&lt;li&gt;Improvements to DB2's XML support including expanded pureXML, customer-driven performance and usability requirements, schema validation in the engine, binary XML exchange format, multiversioning, easy update of subparts of XML document, stored procedures, user-defined functions and triggers, XML index matching with date/timestamp, and a CHECK XML utility.&lt;/li&gt;&lt;li&gt;Enhanced query and reporting facilities, including QMF V10 with over 140 new analytical functions, support for HTML, PDF, and Flash reports, and more.&lt;/li&gt;&lt;/ul&gt;So it would seem that there is a lot of new functionality for us to begin to become acquainted with. As IBM rolls out more details, and customers begin to use the new version of DB2, we will examine some of these new features in more depth here on the DB2 Portal blog.&lt;br /&gt;&lt;br /&gt;If you are interested in the beta program, the pre-requisite for DB2 10 is z/OS V1.10 (5694-A01) or later running in 64 bit mode. &lt;a href="http://www-01.ibm.com/software/data/db2/zos/db2-10/"&gt;More information about the DB2 10 beta program is available on IBM's web site&lt;/a&gt;.&lt;br /&gt;&lt;br /&gt;No GA date for DB2 10 has been announced.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/18371456-8430566914193953627?l=www.db2portal.com%2Fblog.html' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://www.blogger.com/feeds/18371456/8430566914193953627/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='https://www.blogger.com/comment.g?blogID=18371456&amp;postID=8430566914193953627' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/18371456/posts/default/8430566914193953627'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/18371456/posts/default/8430566914193953627'/><link rel='alternate' type='text/html' href='http://www.db2portal.com/2010/02/ibm-announces-db2-10-for-zos-beta.html' title='IBM Announces DB2 10 for z/OS Beta Program'/><author><name>Craig S Mullins</name><uri>http://www.blogger.com/profile/17077237739217901780</uri><email>noreply@blogger.com</email><gd:extendedProperty xmlns:gd='http://schemas.google.com/g/2005' name='OpenSocialUserId' value='03814325010211222227'/></author><thr:total xmlns:thr='http://purl.org/syndication/thread/1.0'>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-18371456.post-3783670189068844468</id><published>2010-02-03T21:55:00.002-06:00</published><updated>2010-02-03T22:00:13.329-06:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='data'/><category scheme='http://www.blogger.com/atom/ns#' term='IBM'/><category scheme='http://www.blogger.com/atom/ns#' term='InfoSphere'/><title type='text'>IBM Manages the Data Lifecycle</title><content type='html'>Data lifecycle is a somewhat new-ish term, at least in terms of what I plan to talk about in this blog posting. The data lifecycle – and data lifecycle management – deals with tracking, managing, and understanding data and metadata as it flows through organizations. From its inception…whether entered by a clerk or read via a feed or loaded from an external source, etc…through its various usages…whether to conduct business, analyze trends and patterns, and so on…tracked from system to system, application to application, and user to user…and finally through its end of life.&lt;br /&gt;&lt;br /&gt;Not many companies today can track all of their important data and what happens to it throughout its entire lifecycle. But doing so is important. Having such a capability enables organizations to adapt and react, gaining a competitive advantage. Much can go awry as data moves throughout an organization. Schema changes, policy changes, regulations adapt, programs change, formats changes, and so on. Any of these things can cause data quality issues, which should be brought to the attention of the business analyst using the data. But how often is this done? Knowing the history of data and its related metadata can improve business processes. But it is a major task – both for businesses and IT vendors hoping to offer solutions.&lt;br /&gt;&lt;br /&gt;Which brings me to today’s (February 3, 2010) announcements from IBM. Big Blue announced new data protection software, a line of consulting services and resources and previewed information monitoring software to help organizations expand their use of trusted information to improve decision making. These moves further bolster IBM’s already formidable arsenal of data lifecycle management solutions.&lt;br /&gt;&lt;br /&gt;The data protection announcement was for Optim Data Redaction. This solution, engineered for unstructured data like Word documents and PDF files, automatically recognizes and removes sensitive content from documents and forms. For example, a customer’s credit scores in a loan document could be hidden from an office clerk, while still being visible to a loan officer. In today’s atmosphere of more and more stringent regulations, a data redaction solution is becoming a requirement. For example, PCI DSS industry standards dictate specific rules regarding the display of debit and credit card information on receipts and reports.&lt;br /&gt;&lt;br /&gt;Optim Data Redaction is planned for general availability in March 2010.&lt;br /&gt;&lt;br /&gt;The information monitoring announcement was for InfoSphere Business Monitor. This technology is based on a combination of work from IBM’s research group and technology gained when IBM acquired Guardium. Guardium is a database activity monitoring (or auditing) solution. InfoSphere Business Monitor tracks the quality and flow of an organization’s information and provides real-time alerts of potential flaws. For example, if a health insurance company was analyzing profit margins across different product lines (individual, group, HMO, Medicare, etc.), decision makers would immediately be alerted when a data feed from a specific geography was not successfully integrated.&lt;br /&gt;&lt;br /&gt;InfoSphere Business Monitor is available as a technology preview; it is not generally available and no GA date was announced.&lt;br /&gt;&lt;br /&gt;At the same time, IBM announced its intention to acquire Initiate Systems, a provider of data integrity software for information sharing among healthcare and government organizations.  Initiate's software helps healthcare clients work more intelligently and efficiently with timely access to patient and clinical data. It also enables governments to share information across multiple agencies to better serve citizens. IBM plans to continue to support and enhance Initiate's technologies while helping clients take advantage of the broader IBM portfolio, specifically Cognos and InfoSphere solutions for BI and analytics. This acquisition bolsters IBM’s data lifecycle management offering along these verticals.&lt;br /&gt;&lt;br /&gt;And all of today’s announcements serve to clarify IBM’s ascent to the throne within the realm of information and data lifecycle management.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/18371456-3783670189068844468?l=www.db2portal.com%2Fblog.html' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://www.blogger.com/feeds/18371456/3783670189068844468/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='https://www.blogger.com/comment.g?blogID=18371456&amp;postID=3783670189068844468' title='3 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/18371456/posts/default/3783670189068844468'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/18371456/posts/default/3783670189068844468'/><link rel='alternate' type='text/html' href='http://www.db2portal.com/2010/02/ibm-manages-data-lifecycle.html' title='IBM Manages the Data Lifecycle'/><author><name>Craig S Mullins</name><uri>http://www.blogger.com/profile/17077237739217901780</uri><email>noreply@blogger.com</email><gd:extendedProperty xmlns:gd='http://schemas.google.com/g/2005' name='OpenSocialUserId' value='03814325010211222227'/></author><thr:total xmlns:thr='http://purl.org/syndication/thread/1.0'>3</thr:total></entry><entry><id>tag:blogger.com,1999:blog-18371456.post-1591292231490659796</id><published>2010-02-02T12:41:00.004-06:00</published><updated>2010-02-02T13:04:10.203-06:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='Oracle versus DB2'/><title type='text'>Larry Sure Knows How to Get Press</title><content type='html'>Going under the assumption (I assume) that no press is bad press, Oracle CEO Larry Ellison has attacked IBM's DB2... but he made several factual errors in his rant.&lt;br /&gt;&lt;br /&gt;Here are some of the highlight (?) of the claims Ellison made about DB2 during a webcast last week.&lt;br /&gt;&lt;br /&gt;Regarding TPC-C benchmarks, Ellison claims to have "(blown) the doors off of IBM. We crushed them." He went on to elaborate saying "In a machine that took up less than 10% the floor space, of IBM's record setting computer. We ran faster, we ran a lot faster: using a tiny fraction of the floor space, a tiny fraction of the power, cost less."&lt;br /&gt;&lt;br /&gt;First of all, technicians working in trenches know that benchmarks are not indicative of real life performance. That aside, it is true that Oracle currently has the leading TPC-C benchmark result. Until late in 2009, DB2 enjoyed a massive 49% lead over Oracle. Oracle's most recent results give them a 25% lead (using more than six times as many CPU cores to do it).&lt;br /&gt;&lt;br /&gt;Regarding the claim of using less space and power, this is due to Oracle using flash memory and comparing it with an IBM benchmark using conventional disk technology. &lt;a href="http://www.ibm.com/systems/migratetoibm/getthefacts/powersystem.html"&gt;If Oracle compared its benchmark to an IBM system using flash memory, these claims would not stand&lt;/a&gt;. &lt;br /&gt;&lt;br /&gt;Later, Ellison claimed that "SAP chooses the Oracle Database to run under SAP in almost all their large accounts." As anyone who follows the computer industry knows, this claim is rather absurd. SAP's customers choose the DBMS to run, not SAP. And if SAP had anything to say about it, they would not recommend Oracle, their biggest competitor in the commercial business applications space. Furthermore, SAP favors DB2 for their own systems.  &lt;a href="www.youtube.com/watch?v=DZNXbqorQU0"&gt;They operate more    than a thousand SAP systems, and all of those systems run on DB2&lt;/a&gt;.&lt;br /&gt;&lt;br /&gt;Perhaps the silliest of Ellison's comments is this: "The Oracle Database scales out, IBM DB2 for Unix does not.  Let me see, how many servers can IBM put together for an OLTP application?    Let's see, how many can they group together?  Um, one. They can have up to one server attacking really big jobs.  When they need more capacity, they make that server bigger.  And then they take the old server out, put a bigger one in.  And when you've got the biggest server, that's it. That's all the can do for OLTP." Ellison also claimed that IBM "can't scale out, they can't do cloud, they can't do clusters, the can't do any of this."&lt;br /&gt;&lt;br /&gt;I bet this surprised a lot of DB2 users doing these things with DB2! DB2 Parallel Edition was released in 1995, along with the capability to scale to a system of over a 100 Unix servers.  DB2 LUW scalability is proven in many of the world's largest OLTP environments. Consider this &lt;a href="http://www.ibm.com/press/us/en/pressrelease/19698.wss"&gt;press release talking about how DB2 LUW powers one of the largest OLTP systems in the world&lt;/a&gt;.&lt;br /&gt;&lt;br /&gt;And what about that clustering claim? Evidently Mr. Ellison slept through 2009. &lt;a href="http://www.ibm.com/developerworks/data/products/db2/purescale/"&gt;IBM DB2 pureScale&lt;/a&gt;, released last year, offers powerful, efficient database clustering.  For a cluster of 64 nodes, &lt;a href="http://db2news.wordpress.com/2009/10/09/db2-purescale-unlimited-capacity-transparent-to-applications/"&gt;DB2 pureScale &lt;/a&gt;maintains 95% efficiency.  At 128 nodes, DB2 pureScale maintains 84% efficiency. This is important because if you are growing a cluster to handle bigger workloads, you want your hardware to be doing productive work, not handling system overhead. On the other hand, Oracle RAC has a 100 server limit...&lt;br /&gt;&lt;br /&gt;Ellison also made other far-out claims about IBM like "They're so far behind, I don't think they have any chance at all.  I'm serious." Ellison also said "They are not competitive in the database business, except on the mainframe."&lt;br /&gt;&lt;br /&gt;If this were true, why would Ellison spend any time thinking or talking about IBM. He must be worried, IMHO. Anyone with even a cursory knowledge of the computer industry has to admire IBM. They have led the industry in developing patents for the last 17 years. In 2009, &lt;a href="http://www.ificlaims.com/IFI%202009%20patents%20011210%20final.htm"&gt;IBM produced 4914 patents while Oracle did not even place in the top 50 patent leaders&lt;/a&gt;. A search of the US Patent office database reveals 1588 patents with "database" in the patent description while Oracle produced only 184 patents.&lt;br /&gt;&lt;br /&gt;Hyperbole is one thing, but gross inaccuracy is another. In his latest tirade, Ellison is guilty of both. Oracle makes a good DBMS... pity its CEO doesn't think it can sell it on its own merits without making up stuff about the competition.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/18371456-1591292231490659796?l=www.db2portal.com%2Fblog.html' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://www.blogger.com/feeds/18371456/1591292231490659796/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='https://www.blogger.com/comment.g?blogID=18371456&amp;postID=1591292231490659796' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/18371456/posts/default/1591292231490659796'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/18371456/posts/default/1591292231490659796'/><link rel='alternate' type='text/html' href='http://www.db2portal.com/2010/02/larry-sure-knows-how-to-get-press.html' title='Larry Sure Knows How to Get Press'/><author><name>Craig S Mullins</name><uri>http://www.blogger.com/profile/17077237739217901780</uri><email>noreply@blogger.com</email><gd:extendedProperty xmlns:gd='http://schemas.google.com/g/2005' name='OpenSocialUserId' value='03814325010211222227'/></author><thr:total xmlns:thr='http://purl.org/syndication/thread/1.0'>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-18371456.post-773830289001455300</id><published>2010-02-01T16:59:00.002-06:00</published><updated>2010-02-01T17:01:58.603-06:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='education'/><category scheme='http://www.blogger.com/atom/ns#' term='DBA'/><title type='text'>Some New Year's Resolutions for DBAs</title><content type='html'>&lt;div class="BlogPostContent"&gt;   &lt;p&gt;&lt;span style="font-style: italic;"&gt;This is sort of a re-blogging (to coin a term). I first published this last month in the Data Management Today blog I wrote for NEON. Well, I no longer work for NEON and I'm not sure how long that blog will remain active, so I thought it might make sense to re-blog some of the pertinent entries here... so here goes with my New Year's Resolutions for DBAs blog entry...&lt;/span&gt;&lt;br /&gt;&lt;/p&gt;&lt;p&gt;At the beginning over every year many of us take the time to cobble together some resolutions for the coming year. We plan to lose weight, save money, stop smoking, and so on. Usually, it doesn’t take long before we’ve abandoned these resolutions. Perhaps we’d be wiser to make some business related resolutions. With that in mind, here are some thoughts on the New Year’s resolutions you might be wise to make as a DBA in 2010. &lt;/p&gt;&lt;p&gt;Are you &lt;strong&gt;insatiably curious&lt;/strong&gt;? A good DBA must become a jack-of-all-trades. DBAs are expected to know everything about everything -- at least in terms of how it works with databases. From technical and business jargon to the latest management and technology fads, the DBA is expected to be "in the know." So perhaps “be more curious” would be a useful DBA resolution. &lt;/p&gt;&lt;p&gt;Most DBAs know that private time is a luxury we cannot afford. A DBA must be prepared for interruptions at any time to answer any type of question -- and not just about databases, either. With that in mind, how are your &lt;strong&gt;people skills&lt;/strong&gt;? DBA are usually respected as a database guru, but also frequently criticized as a curmudgeon with limited people skills. Just about every database programmer has his or her favorite DBA story. You know, those anecdotes that begin with "I had a problem..." and end with "and then he told me to stop bothering him and read the manual." DBAs simply do not have a "warm and fuzzy" image. However, this perception probably has more to do with the nature and scope of the job than with anything else. The DBMS spans the enterprise, effectively placing the DBA on call for the applications of the entire organization. As such, you will interact with many different people and take on many different roles. To be successful, you will need an easy-going and somewhat amiable manner. So another good New Year’s resolution might be to “improve your people skills.” Take a Dale Carnegie course or start by reading Carnegie’s seminal book, &lt;a href="http://www.amazon.com/gp/product/1439167346?ie=UTF8&amp;amp;tag=mullinassoci-20&amp;amp;linkCode=xm2&amp;amp;camp=1789&amp;amp;creativeASIN=1439167346" target="_blank"&gt;How to Win Friends and Influence People&lt;/a&gt;. &lt;/p&gt;&lt;p&gt; How &lt;strong&gt;adaptable &lt;/strong&gt;you are? A day in the life of a DBA is usually quite hectic. The DBA maintains production and test environments, monitors active application development projects, attends strategy and design meetings, selects and evaluates new products and connects legacy systems to the Web. And, of course: Joe in Accounting just resubmitted that query from hell that's bringing the system to a halt. Can you do something about that? All of this can occur within a single workday. You must be able to embrace the chaos to succeed as a DBA. So a third resolution might be to “roll with the punches” better – and without complaining! &lt;/p&gt;&lt;p&gt;Of course, you need to be &lt;strong&gt;organized &lt;/strong&gt;and &lt;strong&gt;capable of succinct planning&lt;/strong&gt;, too. Being able to plan for changes and implement new functionality is a key component of database administration. And although this may seem to clash with the need to be flexible and adaptable, it doesn't really. Not once you get used to it. You just need to prepare yourself to be adapatable and organize to incorporate change more rapidly than others. So my final suggestion for a 2010 New Year’s resolution is to adopt a planning methodology and stick to it. Buy a planner – either electronic or not – and use it this year. You might even consider taking a time management class. &lt;/p&gt;&lt;p&gt;If you keep all of these resolutions, just imagine how productive you will be in 2010. And then you can use 2011 to lose weight and save money and… &lt;/p&gt;  &lt;/div&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/18371456-773830289001455300?l=www.db2portal.com%2Fblog.html' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://www.blogger.com/feeds/18371456/773830289001455300/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='https://www.blogger.com/comment.g?blogID=18371456&amp;postID=773830289001455300' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/18371456/posts/default/773830289001455300'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/18371456/posts/default/773830289001455300'/><link rel='alternate' type='text/html' href='http://www.db2portal.com/2010/02/some-new-years-resolutions-for-dbas.html' title='Some New Year&apos;s Resolutions for DBAs'/><author><name>Craig S Mullins</name><uri>http://www.blogger.com/profile/17077237739217901780</uri><email>noreply@blogger.com</email><gd:extendedProperty xmlns:gd='http://schemas.google.com/g/2005' name='OpenSocialUserId' value='03814325010211222227'/></author><thr:total xmlns:thr='http://purl.org/syndication/thread/1.0'>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-18371456.post-724723915734211056</id><published>2010-01-25T12:08:00.002-06:00</published><updated>2010-01-25T12:20:07.830-06:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='performance'/><category scheme='http://www.blogger.com/atom/ns#' term='Stage 2'/><category scheme='http://www.blogger.com/atom/ns#' term='Stage 1'/><category scheme='http://www.blogger.com/atom/ns#' term='BETWEEN'/><category scheme='http://www.blogger.com/atom/ns#' term='SQL'/><title type='text'>Which is better? "BETWEEN" vs "&lt;=" and &gt;"="</title><content type='html'>This was a recent topic on the &lt;a href="http://www.idug.org/cgi-bin/wa?A0=DB2-L"&gt;DB2-L mailing list&lt;/a&gt; so I thought I'd weigh in with my two cents worth on the topic.&lt;br /&gt;&lt;br /&gt;As with most DB2 (and, indeed, IT) issues, the correct answer is "it depends!" Let's dig a bit deeper to explain what I mean.&lt;br /&gt;&lt;br /&gt;From a maintainability perspective, BETWEEN is probably better. The BETWEEN predicate is easier to understand and code than the equivalent combination of the less than or equal to predicate (&lt;=) and the greater than or equal to predicate (&gt;=). In past releases, in many cases it was more efficient, too. But today the Optimizer recognizes the two formulations as equivalent and there usually is no performance benefit one way or the other. Performance reasons aside, one BETWEEN predicate is easier to understand and maintain than multiple &lt;= and &gt;= predicates. For this reason, I tend to favor using BETWEEN.&lt;br /&gt;&lt;br /&gt;But not always. Consider the scenario of comparing a host variable to two columns. Usually BETWEEN is used to compare one column to two values, here shown using host variables:&lt;br /&gt;&lt;br /&gt;    &lt;span style="font-family: courier new;"&gt;WHERE COLUMN1 BETWEEN :HOST-VAR1 AND :HOST-VAR2&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;However, it is possible to use BETWEEN to compare one value to two columns, as shown:&lt;br /&gt;&lt;br /&gt;    &lt;span style="font-family: courier new;"&gt;WHERE :HOST-VAR BETWEEN COLUMN1 AND COLUMN2&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;This statement should be changed to&lt;br /&gt;&lt;br /&gt;    &lt;span style="font-family: courier new;"&gt;WHERE :HOST_VAR &gt;= COLUMN1 and :HOST-VAR &lt;= COLUMN2&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;The reason for this exception is that a BETWEEN formulation comparing a host variable to two columns is a Stage 2 predicate, whereas the preferred formulation is Stage 1. And we all know that Stage 1 outperforms Stage 2, right?&lt;br /&gt;&lt;br /&gt;Remember too, that SQL is flexible and often the same results can be achieved using different SQL formulations. Sometimes one SQL statement will dramatically outperform a functionally equivalent SQL statement just because it is indexable and the other is not. For example, consider this SQL statement&lt;br /&gt;&lt;br /&gt;&lt;span style="font-family: courier new;"&gt;    SELECT EMPNO, FIRSTNME, MIDINIT, LASTNAME&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family: courier new;"&gt;    FROM   EMP&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family: courier new;"&gt;    WHERE  MIDINIT NOT BETWEEN 'A' AND 'G';&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;It is not indexable because it uses the NOT BETWEEN predicate. However, if we understand the data in the table and the desired results, perhaps we can reformulate the SQL to use indexable predicates, such as&lt;br /&gt;&lt;br /&gt;&lt;span style="font-family: courier new;"&gt;    SELECT EMPNO, FIRSTNME, MIDINIT, LASTNAME&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family: courier new;"&gt;    FROM   EMP&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family: courier new;"&gt;    WHERE  MIDINIT &gt;= 'H';&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;Or we could code &lt;span style="font-family: courier new;"&gt;MIDINIT BETWEEN 'H' AND 'Z'&lt;/span&gt; in place of &lt;span style="font-family: courier new;"&gt;MIDINIT &gt;= 'H'&lt;/span&gt;. Of course, for either of these solutions to work correctly we would need to know that MIDINIT never contained values that collate lower than the value 'A'.&lt;br /&gt;&lt;br /&gt;So, as usual, there is no one size fits all answer to the question!&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/18371456-724723915734211056?l=www.db2portal.com%2Fblog.html' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://www.blogger.com/feeds/18371456/724723915734211056/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='https://www.blogger.com/comment.g?blogID=18371456&amp;postID=724723915734211056' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/18371456/posts/default/724723915734211056'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/18371456/posts/default/724723915734211056'/><link rel='alternate' type='text/html' href='http://www.db2portal.com/2010/01/which-is-better-between-vs.html' title='Which is better? &quot;BETWEEN&quot; vs &quot;&lt;=&quot; and &gt;&quot;=&quot;'/><author><name>Craig S Mullins</name><uri>http://www.blogger.com/profile/17077237739217901780</uri><email>noreply@blogger.com</email><gd:extendedProperty xmlns:gd='http://schemas.google.com/g/2005' name='OpenSocialUserId' value='03814325010211222227'/></author><thr:total xmlns:thr='http://purl.org/syndication/thread/1.0'>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-18371456.post-8201560636895771046</id><published>2010-01-20T14:21:00.003-06:00</published><updated>2010-01-29T10:45:07.690-06:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='generosity factor'/><category scheme='http://www.blogger.com/atom/ns#' term='zAAP'/><category scheme='http://www.blogger.com/atom/ns#' term='zIIP'/><category scheme='http://www.blogger.com/atom/ns#' term='specialty processors'/><category scheme='http://www.blogger.com/atom/ns#' term='enclave SRB'/><title type='text'>On Specialty Processors</title><content type='html'>Today's blog entry is kind of a meta entry.&lt;br /&gt;&lt;br /&gt;As many of my readers know I write two blogs, this one that is predominantly about DB2 for z/OS, and the &lt;a href="http://www.neon.com/blog/blogs/cmullins/default.aspx"&gt;Data Management Today&lt;/a&gt; blog, that focuses on data-related issues, database management, and industry trends.&lt;br /&gt;&lt;br /&gt;Well, I've written a series of entries on my other blog about specialty processors (zIIPs, zAAPs, etc.) and related issues. Since DB2 for z/OS folks should find that information useful and relevant, I thought I'd write an entry pointing my readers here to the pertinent specialty processor entries at my &lt;a href="http://www.neon.com/blog/blogs/cmullins/default.aspx"&gt;Data Management Today&lt;/a&gt; blog, so here goes...&lt;br /&gt;&lt;br /&gt;The first entry I'd like to call your attention to is titled &lt;a href="http://www.neonesoft.com/blog/blogs/cmullins/archive/2009/06/26/Specialty-Processors-on-the-Mainframe.aspx"&gt;Specialty Processors on the Mainframe&lt;/a&gt;. This piece is basically an introduction to the different types of specialty processors (zIIp, zAAP, IFL, ICF), and what they can be used for. It is a good place to start if you are new to specialty processors or are looking for an update.&lt;br /&gt;&lt;br /&gt;The second entry worth a peak is titled simply &lt;a href="http://www.neonesoft.com/blog/blogs/cmullins/archive/2009/08/31/zAAP-on-zIIP.aspx"&gt;zAAP on zIIP&lt;/a&gt;. As you may or may not know, IBM delivered the capability for zAAP work to run on a zIIP (with certain conditions). This blog entry provides a brief synopsis of the August 18, 2009 z/OS V1.11 announcement that introduced the new capability to enable zAAP-eligible workloads to run on zIIPs&lt;br /&gt;&lt;br /&gt;Next up is &lt;a href="http://www.neonesoft.com/blog/blogs/cmullins/archive/2009/10/13/What-is-an-Enclave_3F00_.aspx"&gt;What is an Enclave?&lt;/a&gt; If you are working with zIIPs you have probably heard the term Enclave SRB. And if you are doing any type of distributed workload you've probably heard about enclaves, too. This blog entry is for those who are new to the term, or are confused about it. It offers an explanatory definition of the term "enclave" and points you on to additional reference material for those interested.&lt;br /&gt;&lt;br /&gt;My most recent post over there (January 19, 2010), titled &lt;a href="http://www.neonesoft.com/blog/blogs/cmullins/archive/2010/01/19/What-is-Generosity-Factor_3F00_.aspx"&gt;What is Generosity Factor?&lt;/a&gt;, has been a popular one. This blog entry delves into the generosity factor imposed upon zIIP workload including definitions of geneorsity factor, qualified and eligible work, and a discussion of what it implies for ISV products.&lt;br /&gt;&lt;br /&gt;Hope you find this material worthwhile... and thanks for your continued support of my blogs.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/18371456-8201560636895771046?l=www.db2portal.com%2Fblog.html' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://www.blogger.com/feeds/18371456/8201560636895771046/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='https://www.blogger.com/comment.g?blogID=18371456&amp;postID=8201560636895771046' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/18371456/posts/default/8201560636895771046'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/18371456/posts/default/8201560636895771046'/><link rel='alternate' type='text/html' href='http://www.db2portal.com/2010/01/on-specialty-processors.html' title='On Specialty Processors'/><author><name>Craig S Mullins</name><uri>http://www.blogger.com/profile/17077237739217901780</uri><email>noreply@blogger.com</email><gd:extendedProperty xmlns:gd='http://schemas.google.com/g/2005' name='OpenSocialUserId' value='03814325010211222227'/></author><thr:total xmlns:thr='http://purl.org/syndication/thread/1.0'>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-18371456.post-1094529384189872062</id><published>2010-01-11T11:38:00.002-06:00</published><updated>2010-01-11T11:41:12.680-06:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='DBA'/><title type='text'>Evaluating a DBA Job Offer</title><content type='html'>&lt;span style="font-style: italic;"&gt;Today's blog entry is for DBAs. Although this blog is focused on mainframe DB2 the advice here applies to any DBA job... so pass the linik on to your Oracle and SQL Server friends...&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;As a DBA, it is almost inevitable that you will change jobs several times during your career. When making a job change, you will obviously consider requirements such as salary, bonus, benefits, frequency of reviews, and amount of vacation time. However, you also should consider how the company treats their DBAs. Different organizations place different value on the DBA job. It is imperative to your career development that you scout for progressive organizations that understand the complexity and ongoing learning requirements for the position.&lt;br /&gt;&lt;br /&gt;Here are some useful questions to ask:&lt;br /&gt;&lt;br /&gt;&lt;span style="font-weight: bold;"&gt;Does the company offer regular training for its DBAs to learn new DBMS features and functionality? &lt;/span&gt;&lt;br /&gt;&lt;br /&gt;As a DBA you need to be well-versed on the latest and greatest features of the DBMSs you manage. And, on average, there will be a new version to contend with every 18 to 24 months. It is possible to learn the basics by reading the WHAT'S NEW manual and skimming through the voluminous, additional manuals, but some formal training is warranted to get the most out of a new version of the DBMS.&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="font-weight: bold;"&gt;What about training for related technologies such as programming, networking, e-business, transaction management, message queueing, and the like? &lt;/span&gt;&lt;br /&gt;&lt;br /&gt;DBAs are also called upon to administer more than just databases these days. A top notch employer will allow its DBAs to be trained in new technologies... as well as time for independent learning through reading books and articles.&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="font-weight: bold;"&gt;Does the company allow DBAs to regularly attend local user groups? What about annual user groups at remote locations? &lt;/span&gt;&lt;br /&gt;&lt;br /&gt;User groups are essential for networking with others who perform the same, or similar, job duties. By attending local user group meetings you can not only get inexpensive training through watching the presentations, but you can also learn exchange ideas with your peers.&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="font-weight: bold;"&gt;Are there backup DBAs, or will you be the only one on call 24/7? &lt;/span&gt;&lt;br /&gt;&lt;br /&gt;Nobody wants to be the only DBA on call, every night, all the time, on weekends, holidays, etc. And if there is no backup what happens if you take a vacation? Is it really a vacation if you have to carry a company cell phone everywhere you go?&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="font-weight: bold;"&gt;Are there data administration and system administration organizations, or are the DBAs expected to perform all of these duties, too? &lt;/span&gt;&lt;br /&gt;&lt;br /&gt;DBA is a full-time job but some organizations expect the DBA staff to handle data administration and system administration duties, too. Depending on the volume of work this might not be a deal breaker, but be cautious.&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="font-weight: bold;"&gt;Does the DBA group view its relationship with application development groups as a partnership? Or is the relationship more antagonistic? &lt;/span&gt;&lt;br /&gt;&lt;br /&gt;A partnership is essential in order to produce optimally performing database applications. And if you do not have applications that perform well, then the DBA job will be burdensome.&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="font-weight: bold;"&gt;Are DBAs included in design reviews, budgeting discussions, and other high-level IT committees and functions?&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;The more involved the DBA team is in the overall IT strategy the better prepared the company's databases will be to support the required work... and the easier your job will be as a DBA.&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;The more YES answers you get to these questions, the more progressive the DBA environment is. Be sure to ask these questions during your interview. It will show that you have experience and that you care about your career. Be sure to research the answers later, too. Ask around about the company to those who used to work there and anyone you know (remember those user groups) that currently works there. Sometimes the answers given by the workers will not exactly match those given by the interviewer.&lt;br /&gt;&lt;br /&gt;&lt;span style="font-style: italic;"&gt;Keep in mind, too, that these are not the ONLY questions you need to ask. &lt;/span&gt;&lt;br /&gt;&lt;br /&gt;And good luck with you DBA career!&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/18371456-1094529384189872062?l=www.db2portal.com%2Fblog.html' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://www.blogger.com/feeds/18371456/1094529384189872062/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='https://www.blogger.com/comment.g?blogID=18371456&amp;postID=1094529384189872062' title='3 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/18371456/posts/default/1094529384189872062'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/18371456/posts/default/1094529384189872062'/><link rel='alternate' type='text/html' href='http://www.db2portal.com/2010/01/evaluating-dba-job-offer.html' title='Evaluating a DBA Job Offer'/><author><name>Craig S Mullins</name><uri>http://www.blogger.com/profile/17077237739217901780</uri><email>noreply@blogger.com</email><gd:extendedProperty xmlns:gd='http://schemas.google.com/g/2005' name='OpenSocialUserId' value='03814325010211222227'/></author><thr:total xmlns:thr='http://purl.org/syndication/thread/1.0'>3</thr:total></entry><entry><id>tag:blogger.com,1999:blog-18371456.post-4748954585754886679</id><published>2009-12-21T18:24:00.002-06:00</published><updated>2009-12-21T18:27:24.281-06:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='Happy Holidays'/><title type='text'>Happy Holidays</title><content type='html'>&lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://www.db2portal.com/uploaded_images/HappyHolidaysLights-784561.gif"&gt;&lt;img style="margin: 0pt 10px 10px 0pt; float: left; cursor: pointer; width: 320px; height: 281px;" src="http://www.db2portal.com/uploaded_images/HappyHolidaysLights-784556.gif" alt="" border="0" /&gt;&lt;/a&gt;&lt;br /&gt;Just a brief posting today to wish everyone a very happy holiday season.&lt;br /&gt;&lt;br /&gt;I am taking some down time thru the end of the year to visit family "up North."&lt;br /&gt;&lt;br /&gt;So, until next year, may your databases run without a glitch and here's hoping you all have an enjoyable holiday!&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/18371456-4748954585754886679?l=www.db2portal.com%2Fblog.html' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://www.blogger.com/feeds/18371456/4748954585754886679/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='https://www.blogger.com/comment.g?blogID=18371456&amp;postID=4748954585754886679' title='1 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/18371456/posts/default/4748954585754886679'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/18371456/posts/default/4748954585754886679'/><link rel='alternate' type='text/html' href='http://www.db2portal.com/2009/12/happy-holidays.html' title='Happy Holidays'/><author><name>Craig S Mullins</name><uri>http://www.blogger.com/profile/17077237739217901780</uri><email>noreply@blogger.com</email><gd:extendedProperty xmlns:gd='http://schemas.google.com/g/2005' name='OpenSocialUserId' value='03814325010211222227'/></author><thr:total xmlns:thr='http://purl.org/syndication/thread/1.0'>1</thr:total></entry><entry><id>tag:blogger.com,1999:blog-18371456.post-7616184170039803969</id><published>2009-12-16T15:59:00.003-06:00</published><updated>2009-12-16T16:10:04.284-06:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='performance'/><category scheme='http://www.blogger.com/atom/ns#' term='DB2'/><category scheme='http://www.blogger.com/atom/ns#' term='change management'/><category scheme='http://www.blogger.com/atom/ns#' term='SQL'/><title type='text'>Quick Thoughts on DB2 Performance</title><content type='html'>Database performance problems are not caused by magic. Indeed, all performance problems are always caused by change. That statement flies in the face of what I normally say, which is “Almost never say &lt;span style="font-style: italic;"&gt;always &lt;/span&gt;or &lt;span style="font-style: italic;"&gt;never&lt;/span&gt;”… but in this case, it is true.&lt;br /&gt;&lt;br /&gt;Think about it for a moment. If everything remains stable and unchanging in your environment, then why would performance vary? That’s right, it wouldn’t.&lt;br /&gt;&lt;br /&gt;Something tangible &lt;span style="font-style: italic;"&gt;must &lt;/span&gt;change before a performance problem can be experienced. The challenge of performance tuning is to find the source of the change, gauge its impact, and formulate a solution.&lt;br /&gt;&lt;br /&gt;Change can take many forms, including the following:&lt;br /&gt;&lt;ul&gt;&lt;li&gt;Physical changes to the environment, such as a new CPU, new disk devices, or different tape drives.&lt;br /&gt;&lt;/li&gt;&lt;li&gt;Changes to system software, such as a new release of a product (for example, WebSphere, CICS, or even z/OS), the alteration of a product (for example, the addition of more or fewer CICS regions or an IMS SYSGEN), or a new product (for example, implementation of DFHSM). Also included is the installation of a new release or version of DB2, which can result in changes in access paths as well as utilization of new features.&lt;br /&gt;&lt;/li&gt;&lt;li&gt;Changes to the DB2 engine from maintenance releases and PTFs, which can change the optimizer (and sometimes introduce other new functionality).&lt;br /&gt;&lt;/li&gt;&lt;li&gt;Changes in system capacity. More or fewer jobs could be executing concurrently when the performance problem occurs. Or additional users may be banging away at your transactions.&lt;br /&gt;&lt;/li&gt;&lt;li&gt;Environmental changes, such as the implementation of client/server programs, the adoption of SOA, or other new technologies.&lt;br /&gt;&lt;/li&gt;&lt;li&gt;Database changes. This involves changes to any DB2 object, and ranges from adding a new column or an index to dropping and re-creating an object.&lt;br /&gt;&lt;/li&gt;&lt;li&gt;Changes to the application development methodology, such as usage of check constraints instead of application logic or the use of stored procedures.&lt;br /&gt;&lt;/li&gt;&lt;li&gt;Changes to application code, both SQL and host language code (COBOL, C, Java, etc.).&lt;br /&gt;&lt;/li&gt;&lt;/ul&gt;&lt;br /&gt;Although the majority of your performance problems are likely to be application-oriented, you must be prepared to explore any and all of these other areas when application tuning has little effect.&lt;br /&gt;&lt;br /&gt;My advice is to be sure that you institute strict change control tracking across all areas of your IT infrastructure. That way, whenever you experience a performance problem, you will be able to track what has changed recently, along with who changed it and why. This is important because every DBA knows what the answer to the question “What changed?” will be… right?&lt;br /&gt;&lt;p&gt;It is always “nothing!”&lt;br /&gt;&lt;/p&gt;&lt;p&gt;And that cannot be true. Oh, it does not mean that the person answering is lying. He or she may not have changed anything. And it is not necessarily reasonable to expect an application developer to know what all could have changed…especially when what can impact DB2 performance spans so many areas of the IT infrastructure.&lt;br /&gt;&lt;/p&gt;&lt;p&gt;&lt;br /&gt;So do yourself… and your company a favor: be sure that you meticulously track each and every change to any aspect of your systems. Then – and this is where many shops break down – make sure that you have methods of tying all of the change information together in such a way that it can be queried and examined in the face of a performance problem.&lt;br /&gt;&lt;/p&gt;&lt;p&gt;&lt;br /&gt;Only then can you reasonably expect your DBAs rapidly to be able to track down and remedy DB2 performance problems… because only then will they have the pertinent information at their disposal.&lt;/p&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/18371456-7616184170039803969?l=www.db2portal.com%2Fblog.html' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://www.blogger.com/feeds/18371456/7616184170039803969/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='https://www.blogger.com/comment.g?blogID=18371456&amp;postID=7616184170039803969' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/18371456/posts/default/7616184170039803969'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/18371456/posts/default/7616184170039803969'/><link rel='alternate' type='text/html' href='http://www.db2portal.com/2009/12/quick-thoughts-on-db2-performance.html' title='Quick Thoughts on DB2 Performance'/><author><name>Craig S Mullins</name><uri>http://www.blogger.com/profile/17077237739217901780</uri><email>noreply@blogger.com</email><gd:extendedProperty xmlns:gd='http://schemas.google.com/g/2005' name='OpenSocialUserId' value='03814325010211222227'/></author><thr:total xmlns:thr='http://purl.org/syndication/thread/1.0'>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-18371456.post-7590327742301592153</id><published>2009-12-11T13:53:00.002-06:00</published><updated>2009-12-11T13:56:46.327-06:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='V5'/><category scheme='http://www.blogger.com/atom/ns#' term='V7'/><category scheme='http://www.blogger.com/atom/ns#' term='V4'/><category scheme='http://www.blogger.com/atom/ns#' term='V6'/><category scheme='http://www.blogger.com/atom/ns#' term='history'/><category scheme='http://www.blogger.com/atom/ns#' term='V9'/><category scheme='http://www.blogger.com/atom/ns#' term='V8'/><title type='text'>A Short History of DB2 for z/OS – Part 2</title><content type='html'>Today’s blog entry is a continuation of yesterday’s post in which we began a brief review of the history of DB2 for z/OS. That post covered Versions 1 through 3; so today we pick up our historical review with Version 4.&lt;br /&gt;&lt;br /&gt;Version 4 was a very significant milestone in the history of DB2. It was highlighted by the introduction of Type 2 indexes, which removed the need to lock index pages (or subpages, now obsolete). Prior to V4, index locking was a particularly thorny performance problem that vexed many shops.  And, of course, I’d be remiss if I did not discuss data sharing, which made its debut in V4. With data sharing, DB2 achieved new heights of scalability and availability unmatched within the realm of DBMS; it afforded users the ability to upgrade without an outage and to add new subsystems to a group “on the fly.” The new capabilities did not stop with there; V4 also introduced stored procedures, CP parallelism, performance improvements, and more. DB2 V4 was, indeed, a major milestone in the history of mainframe DB2.&lt;br /&gt;&lt;br /&gt;In June 1997 DB2 Version 5 became generally available. It was the first DB2 version to be referred to as DB2 for OS/390 (previously it was DB2 for MVS). Not as significant as V4, we see the trend of even numbered releases being bigger and more significant than odd numbered releases (of course, this is just my opinion). V5 was touted by IBM as the e-business and BI version. It included Sysplex parallelism, prepared statement caching, reoptimization, online REORG, and conformance to the SQL-92 standard.&lt;br /&gt;&lt;br /&gt;Version 6 brings us to 1999 and the introduction of the Universal Database term to the DB2 moniker. The “official” name of the product is now DB2 Universal Database for OS/390. And the Release Guide swelled to over 600 pages! Six categories of improvements were introduced with V6 spanning:&lt;br /&gt;&lt;ul&gt;&lt;li&gt;Object-relational extensions and active data&lt;/li&gt;&lt;li&gt;Network computing&lt;/li&gt;&lt;li&gt;Performance and availability&lt;/li&gt;&lt;li&gt;Capacity improvements&lt;/li&gt;&lt;li&gt;Data sharing enhancements&lt;/li&gt;&lt;li&gt;User productivity&lt;/li&gt;&lt;/ul&gt;The biggest of the new features were SQLJ, inline statistics, triggers, large objects (LOBs), user-defined functions, and distinct types. &lt;br /&gt;&lt;br /&gt;Version 6 is also somewhat unique in that there was this “thing” typically referred to as the V6 refresh. It added functionality to DB2 without there being a new release or version. The new functionality in the refresh included SAVEPOINTs, identity columns, declared temporary tables, and performance enhancements (including star join).&lt;br /&gt;&lt;br /&gt;March 2001 brings us to DB2 Version 7, another “smaller” version of DB2. Developed and released around the time of the Year 2000 hubbub, it offered much improved utilities and some nice new SQL functionality including scrollable cursors, limited FETCH, and row expressions. Unicode support was also introduced in Db2 V7. For a more detailed overview of V7 (and the V6 refresh) consult &lt;a href="http://www.craigsmullins.com/dbaz-DB2v7.htm"&gt;An Introduction to DB2 for OS/390 Version 7&lt;/a&gt;.&lt;br /&gt;&lt;br /&gt;DB2 Version 8 followed, but not immediately. IBM took advantage of Y2K and the general desire of shop’s to avoid change during this period to take its time and deliver the most significant and feature-laden version of DB2 ever. V8 had more new lines of code than DB2 V1R1 had total lines of code!&lt;br /&gt;&lt;br /&gt;I don’t want to get bogged down in recent history here outlining the features and functionality of DB2 releases that should be fresh in our memory (V8 and V9). If you really want some details on those refer to these links for them:&lt;br /&gt;&lt;br /&gt;&lt;a href="http://www.craigsmullins.com/zjdp_001.htm"&gt;An Overview of DB2 for z/OS Version 8&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;&lt;a href="http://www.neon.com/blog/blogs/cmullins/archive/2007/08/06/DB2-9-for-zF00_OS-Features.aspx"&gt;&lt;br /&gt;DB2 9 for z/OS Features&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;Which brings us to today. Most shops should be either running Version 9 in production or planning their migration from V8 to V9. And we are all waiting with baited breath for DB2 X… which hopefully should be announced sometime next year.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/18371456-7590327742301592153?l=www.db2portal.com%2Fblog.html' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://www.blogger.com/feeds/18371456/7590327742301592153/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='https://www.blogger.com/comment.g?blogID=18371456&amp;postID=7590327742301592153' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/18371456/posts/default/7590327742301592153'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/18371456/posts/default/7590327742301592153'/><link rel='alternate' type='text/html' href='http://www.db2portal.com/2009/12/short-history-of-db2-for-zos-part-2.html' title='A Short History of DB2 for z/OS – Part 2'/><author><name>Craig S Mullins</name><uri>http://www.blogger.com/profile/17077237739217901780</uri><email>noreply@blogger.com</email><gd:extendedProperty xmlns:gd='http://schemas.google.com/g/2005' name='OpenSocialUserId' value='03814325010211222227'/></author><thr:total xmlns:thr='http://purl.org/syndication/thread/1.0'>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-18371456.post-1735656982895736929</id><published>2009-12-10T10:31:00.004-06:00</published><updated>2009-12-10T10:34:16.669-06:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='packages'/><category scheme='http://www.blogger.com/atom/ns#' term='V2'/><category scheme='http://www.blogger.com/atom/ns#' term='history'/><category scheme='http://www.blogger.com/atom/ns#' term='V1'/><category scheme='http://www.blogger.com/atom/ns#' term='V3'/><title type='text'>A Short History of DB2 for z/OS – Part 1</title><content type='html'>Let's go back in time... almost three decades ago... back to the wild and woolly 1980s! And watch our favorite DBMS, DB2, grow up over time.&lt;br /&gt;&lt;br /&gt;Version 1 Release 1 was announced on June 7, 1983. And it became generally available on Tuesday, April 2, 1985. I wonder if it was ready on April 1st but not released because of April Fool’s Day? Any old-time IBMer out there care to comment?&lt;br /&gt;&lt;br /&gt;Initial DB2 development focused on the basics of making a relational DBMS work. Early releases of DB2 were viewed by many as an “information center” DBMS, not for production work like IMS.&lt;br /&gt;&lt;br /&gt;Version 1 Release 2 was announced on February 4, 1986 and was released for general availability a month later on March 7, 1986. Wow! Can you imagine waiting only a month for a new release of DB2 these days? But that is how it happened back then. Same thing for Version 1 Release 3, which was announced on May 19, 1987 and became GA on June 26, 1987. DB2 V1R3 saw the introduction of date data types.&lt;br /&gt;&lt;br /&gt;You might notice that IBM delivered “releases” of DB2 back in the 1980s, whereas today (and ever since V3) there have only been versions. Versions are major, whereas releases are not quite as significant as a version.&lt;br /&gt;&lt;br /&gt;Version 2 of DB2 became a reality in 1988. Version 2 Release 1 was announced in April 1988 and delivered in September 1988. Here we start to see the gap widening again between announcement and delivery. V2R1 was a very significant release in the history of DB2. Some mark it as the bellwether for when DB2 began to be viewed as a DBMS capable of supporting mission critical, transaction processing workloads. Not only did V2R1 provide many performance enhancements but it also signaled the introduction of declarative Referential Integrity (RI) constraints. RI was important for the acceptance of DB2 because it helps to assure data integrity within the DBMS.&lt;br /&gt;&lt;br /&gt;No sooner than V2R1 became GA than IBM announced Version 2 Release 2 on October 4, 1988. But it was not until a year later that it became generally available on September 23, 1988. DB2 V2R2 again bolstered performance in many ways. It also saw the introduction of distributed database support (private protocol) across MVS systems.&lt;br /&gt;&lt;br /&gt;Version 2 Release 3 was announced on September 5, 1990 and became generally available on October 25, 1991. Two very significant features were added in V2R3: segmented table spaces and packages. Segmented table spaces have become the de facto standard for most DB2 data and packages made DB2 application programs easier to support. DB2 V2R3 is also the version that beefed up distributed support with Distributed Relational Database Architecture (DRDA). Remote unit of work distribution was not available in the initial GA version, but IBM came out with RUOW support for DB2 V2R3 in March 1992.&lt;br /&gt;&lt;br /&gt;And along comes DB2 Version 3 announced in November 1993 and GA in December 1993. Now it may look like things sped up again here, but not really. This is when the QPP program for early support of DB2 started. QPP was announced in March 1993 and delivered to customers in June 1993. Still though, fairly rapid turnaround by today’s standards, right?&lt;br /&gt;&lt;br /&gt;V3 greatly expanded the number of bufferpool options available (from 5 pools to 80). There were many advances made in DB2 V3 to take better advantage of the System 390 environment: V3 introduced support for hardware assisted compression and hiperpools. It was also V3 that introduced I/O parallelism for the first time.&lt;br /&gt;&lt;br /&gt;We’ll stop here for today and continue our short history of DB2 in my next DB2Portal blog posting. See you soon...&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/18371456-1735656982895736929?l=www.db2portal.com%2Fblog.html' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://www.blogger.com/feeds/18371456/1735656982895736929/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='https://www.blogger.com/comment.g?blogID=18371456&amp;postID=1735656982895736929' title='1 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/18371456/posts/default/1735656982895736929'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/18371456/posts/default/1735656982895736929'/><link rel='alternate' type='text/html' href='http://www.db2portal.com/2009/12/short-history-of-db2-for-zos-part-1.html' title='A Short History of DB2 for z/OS – Part 1'/><author><name>Craig S Mullins</name><uri>http://www.blogger.com/profile/17077237739217901780</uri><email>noreply@blogger.com</email><gd:extendedProperty xmlns:gd='http://schemas.google.com/g/2005' name='OpenSocialUserId' value='03814325010211222227'/></author><thr:total xmlns:thr='http://purl.org/syndication/thread/1.0'>1</thr:total></entry><entry><id>tag:blogger.com,1999:blog-18371456.post-7651836888601493638</id><published>2009-12-02T15:55:00.002-06:00</published><updated>2009-12-02T15:59:26.841-06:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='DB2'/><category scheme='http://www.blogger.com/atom/ns#' term='data'/><category scheme='http://www.blogger.com/atom/ns#' term='Wordle'/><title type='text'>Wordle of my DB2 Portal Blog</title><content type='html'>&lt;a href="http://www.wordle.net/show/wrdl/1404227/DB2_Portal_Wordle" title="Wordle: DB2 Portal Wordle"&gt;&lt;img src="http://www.wordle.net/thumb/wrdl/1404227/DB2_Portal_Wordle" alt="Wordle: DB2 Portal Wordle" style="border: 1px solid rgb(221, 221, 221); padding: 4px;" /&gt;&lt;/a&gt; The "jumble" of words shown here is a &lt;a href="http://www.wordle.net/"&gt;Wordle&lt;/a&gt;, which is a "word cloud" of  text. I fed my blog location into the Wordle generator and it created this pretty picture based on the words I most commonly use here in this blog.&lt;br /&gt;&lt;br /&gt;The cloud   gives greater prominence to words that appear more frequently   in the source text. No surprise that "DB2" and "data" dominate the other words!&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/18371456-7651836888601493638?l=www.db2portal.com%2Fblog.html' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://www.blogger.com/feeds/18371456/7651836888601493638/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='https://www.blogger.com/comment.g?blogID=18371456&amp;postID=7651836888601493638' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/18371456/posts/default/7651836888601493638'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/18371456/posts/default/7651836888601493638'/><link rel='alternate' type='text/html' href='http://www.db2portal.com/2009/12/wordle-of-my-db2-portal-blog.html' title='Wordle of my DB2 Portal Blog'/><author><name>Craig S Mullins</name><uri>http://www.blogger.com/profile/17077237739217901780</uri><email>noreply@blogger.com</email><gd:extendedProperty xmlns:gd='http://schemas.google.com/g/2005' name='OpenSocialUserId' value='03814325010211222227'/></author><thr:total xmlns:thr='http://purl.org/syndication/thread/1.0'>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-18371456.post-1503658712799573528</id><published>2009-11-23T15:54:00.001-06:00</published><updated>2009-11-23T15:57:03.509-06:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='BIND'/><category scheme='http://www.blogger.com/atom/ns#' term='locking'/><category scheme='http://www.blogger.com/atom/ns#' term='ISOLATION'/><category scheme='http://www.blogger.com/atom/ns#' term='SQL'/><title type='text'>Reading Things That Aren't There... and Missing Things That Are!</title><content type='html'>You can shoot yourself in the foot using DB2 if you are not careful. There are options that you can specify that may cause you to read data that is not really in the database. And, alternately, you can set things up so that you miss reading data that is actually in the database. &lt;br /&gt;&lt;br /&gt;How, you might be asking? Well, dirty reads will take care of the first one. Specifying ISOLATION(UR) implements read-through locks, which is sometimes referred to as a dirty read. It applies to read operations only. With this isolation level data may be read that never actually exists in the database, because the transaction can read data that has been changed by another process but is not yet committed. &lt;br /&gt;&lt;br /&gt;Read uncommitted isolation provides the highest level availability and concurrency of the isolation levels, but the worst degree of data integrity. It should be used only when data integrity problems can be tolerated. Certain types of applications, such as those using analytical queries, estimates, and averages are likely candidates for read uncommitted locking. A dirty read can cause duplicate rows to be returned where none exist or no rows may be returned when one (or more) actually exists. When choosing read uncommitted isolation the programmer and DBA must ensure that these types of problems are acceptable for the application. &lt;br /&gt;&lt;br /&gt;OK, so what about not reading data that is in the database? DB2 V9 provides us an option to do just that. In DB2 9 it is possible for a transaction to skip over rows that are locked. This can be accomplished by means of the SKIP LOCKED DATA option within your SQL statement(s). SKIP LOCKED DATA can be specified in SELECT, SELECT INTO, and PREPARE, as well as searched UPDATE and DELETE statements. You can also use the SKIP LOCKED DATA option with the UNLOAD utility.&lt;br /&gt;&lt;br /&gt;When you tell DB2 to skip locked data then that data is not accessed and your program will not have it available. DB2 just skip over any locked data instead of waiting for it to be unlocked. The benefit, of course, is improved performance because you will not incur any lock wait time. But it comes at the cost of not accessing the locked data at all. This means that you should only utilize this clause when your program can tolerate skipping over some data.&lt;br /&gt;&lt;br /&gt;The SKIP LOCKED DATA option is compatible with cursor stability (CS) isolation and read stability (RS) isolation. But it cannot be used with uncommitted read (UR) or repeatable read (RR) isolation levels. DB2 will simply ignore the SKIP LOCKED DATA clause under UR and RR isolation levels.&lt;br /&gt;&lt;br /&gt;Additionally, SKIP LOCKED DATA works only with row locks and page locks. That means that SKIP LOCKED DATA does not apply to table, partition, LOB, XML, or table space locks. And the bigger the lock size, the more data that will be skipped when a lock is encountered. With row locking you will be skipping over locked rows, but with page locking you will be skipping over all the rows on the locked page.&lt;br /&gt;&lt;br /&gt;Use both of these features with extreme care and make sure that you know exactly what you are telling DB2 to do. Otherwise, you might be reading more... or less than you want!&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/18371456-1503658712799573528?l=www.db2portal.com%2Fblog.html' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://www.blogger.com/feeds/18371456/1503658712799573528/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='https://www.blogger.com/comment.g?blogID=18371456&amp;postID=1503658712799573528' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/18371456/posts/default/1503658712799573528'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/18371456/posts/default/1503658712799573528'/><link rel='alternate' type='text/html' href='http://www.db2portal.com/2009/11/reading-things-that-arent-there-and.html' title='Reading Things That Aren&apos;t There... and Missing Things That Are!'/><author><name>Craig S Mullins</name><uri>http://www.blogger.com/profile/17077237739217901780</uri><email>noreply@blogger.com</email><gd:extendedProperty xmlns:gd='http://schemas.google.com/g/2005' name='OpenSocialUserId' value='03814325010211222227'/></author><thr:total xmlns:thr='http://purl.org/syndication/thread/1.0'>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-18371456.post-4743142589592581005</id><published>2009-11-17T14:58:00.000-06:00</published><updated>2009-11-17T15:02:49.971-06:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='UNION'/><category scheme='http://www.blogger.com/atom/ns#' term='CASE'/><category scheme='http://www.blogger.com/atom/ns#' term='SQL'/><title type='text'>Replacing UNION with CASE</title><content type='html'>When a UNION is required to put together data from multiple queries, you might be able to use a CASE statement instead. This is very useful, particularly when the data for each of the queries in the UNION come from the same table. The CASE statement can potentially enhance performance by minimizing the number of times the data is read.&lt;br /&gt;&lt;br /&gt;Let’s look at an example to clarify why:&lt;br /&gt;&lt;br /&gt;&lt;span style="font-family:courier new;"&gt;    SELECT  CREATOR, NAME, 'TABLE'&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family:courier new;"&gt;    FROM    SYSIBM.SYSTABLES&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family:courier new;"&gt;    WHERE   TYPE = 'T'&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family:courier new;"&gt;    UNION&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family:courier new;"&gt;    SELECT  CREATOR, NAME, 'VIEW '&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family:courier new;"&gt;    FROM    SYSIBM.SYSTABLES&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family:courier new;"&gt;    WHERE   TYPE = 'V'&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family:courier new;"&gt;    UNION&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family:courier new;"&gt;    SELECT  CREATOR, NAME, 'ALIAS'&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family:courier new;"&gt;    FROM    SYSIBM.SYSTABLES&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family:courier new;"&gt;    WHERE   TYPE = 'A'&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family:courier new;"&gt;    ORDER BY NAME;&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;This simple SQL statement uses UNION to put together the results of three queries against the SYSTABLES table. The report shows all of the DB2 &lt;span style="font-style: italic;"&gt;table-like &lt;/span&gt;objects that exist in the DB2 subsystem: tables, views, and synonyms.&lt;br /&gt;&lt;br /&gt;To do this, DB2 must scan through the table three times – once for each query (as there is no index on the TYPE column). But, you can use CASE and code an equivalent, but more efficient query, as follows:&lt;br /&gt;&lt;br /&gt;   &lt;span style="font-family: courier new;"&gt;SELECT CREATOR, NAME,&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family: courier new;"&gt;    CASE TYPE&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family: courier new;"&gt;      WHEN 'T' THEN 'TABLE'&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family: courier new;"&gt;      WHEN 'V' THEN 'VIEW '&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family: courier new;"&gt;      WHEN 'A' THEN 'ALIAS'&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family: courier new;"&gt;    END&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family: courier new;"&gt;    FROM SYSIBM.SYSTABLES&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family: courier new;"&gt;    ORDER BY NAME;&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;This new query will need to scan SYSTABLES only once. The CASE statement will translate the code in the TYPE column into the text that we desire.&lt;br /&gt;&lt;br /&gt;CASE statements are very powerful and you should use them when you can to create elegant and optimal SQL in your DB2 applications.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/18371456-4743142589592581005?l=www.db2portal.com%2Fblog.html' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://www.blogger.com/feeds/18371456/4743142589592581005/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='https://www.blogger.com/comment.g?blogID=18371456&amp;postID=4743142589592581005' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/18371456/posts/default/4743142589592581005'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/18371456/posts/default/4743142589592581005'/><link rel='alternate' type='text/html' href='http://www.db2portal.com/2009/11/replacing-union-with-case.html' title='Replacing UNION with CASE'/><author><name>Craig S Mullins</name><uri>http://www.blogger.com/profile/17077237739217901780</uri><email>noreply@blogger.com</email><gd:extendedProperty xmlns:gd='http://schemas.google.com/g/2005' name='OpenSocialUserId' value='03814325010211222227'/></author><thr:total xmlns:thr='http://purl.org/syndication/thread/1.0'>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-18371456.post-7881308507356430171</id><published>2009-11-03T11:15:00.000-06:00</published><updated>2009-11-03T11:35:04.458-06:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='DB2 X'/><title type='text'>Deprecated Features Planned for DB2 X for z/OS</title><content type='html'>Everyone is always interested in the latest and greatest features of their favorite DBMS, in this case DB2. But sometimes features get removed from the DBMS when a new version is released. According to the IBM teleconference on DB2 X for z/OS today, there are several features &lt;span style="font-style: italic;"&gt;planned &lt;/span&gt;to be deprecated (i.e. removed). Let's briefly take a look at them.&lt;br /&gt;&lt;br /&gt;The first feature that will be removed is private protocol DRDA. This should come as no surprise to anybody since IBM has been indicating that private protocal distribution was on its way out for a number of releases now. And it really is not that difficult to convert to DRDA (and there will be some new help in DSNTP2DP).&lt;br /&gt;&lt;br /&gt;Perhaps more troublesome to some shops will be the removal of support for plans containing DBRMs. You will have to convert the DBRMs to packages when you get to DB2 X. You would think that since packages have been available as far back as V2.3 that most shops would have converted to them already. But I do know that there are some shops out there" who still have DBRMs bound directly into their plans. So start planning to convert ASAP! IBM will offer some support in DB2 X to track down affected plans.&lt;br /&gt;&lt;br /&gt;While on the topic of plans and packages, you will have to REBIND any that have not been rebound since V5 or before. But it is a good rule to REBIND everything when you go to a new version of DB2 anyway, and most (but not all) shops do that.&lt;br /&gt;&lt;br /&gt;From a documentation perspective, BookManager will no longer be supported. Instead we get the PDF versions and the Info Center online.&lt;br /&gt;&lt;br /&gt;And the DB2 Management Clients (DB2 Administration Server, Control Center, and Development Center) are deprecated. IBM's new management client direction for DB2 is Data Studio.&lt;br /&gt;&lt;br /&gt;Other deprecated items include:&lt;br /&gt;&lt;ul&gt;&lt;li&gt;ACQUIRE(ALLOCATE) [change to ACQUIRE(USE)]&lt;/li&gt;&lt;li&gt;Workload capture through profile monitor&lt;/li&gt;&lt;li&gt;XML Extender [change to use pureXML data type]&lt;/li&gt;&lt;li&gt;DB2 MQ XML user-defined functions and stored procedures [change to XML functions]&lt;/li&gt;&lt;li&gt;msys for Setup DB2 Customization Center [change to install panels]&lt;/li&gt;&lt;/ul&gt;At this point, DB2 X is on track to become generally available at the end of next year, 2010. At this point IBM has announced that migration will be supported from DB2 9 NFM (and has hinted that they are considering supporting migration to DB2 X directly from DB2 V8 NFM).&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/18371456-7881308507356430171?l=www.db2portal.com%2Fblog.html' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://www.blogger.com/feeds/18371456/7881308507356430171/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='https://www.blogger.com/comment.g?blogID=18371456&amp;postID=7881308507356430171' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/18371456/posts/default/7881308507356430171'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/18371456/posts/default/7881308507356430171'/><link rel='alternate' type='text/html' href='http://www.db2portal.com/2009/11/deprecated-features-in-db2-x-for-zos.html' title='Deprecated Features Planned for DB2 X for z/OS'/><author><name>Craig S Mullins</name><uri>http://www.blogger.com/profile/17077237739217901780</uri><email>noreply@blogger.com</email><gd:extendedProperty xmlns:gd='http://schemas.google.com/g/2005' name='OpenSocialUserId' value='03814325010211222227'/></author><thr:total xmlns:thr='http://purl.org/syndication/thread/1.0'>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-18371456.post-5947312011163192147</id><published>2009-11-02T09:51:00.000-06:00</published><updated>2009-11-02T09:54:13.059-06:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='DB2'/><category scheme='http://www.blogger.com/atom/ns#' term='Twitter'/><title type='text'>New DB2 Twitter List</title><content type='html'>Just a very quick post this morning to let all you DB2 Twitter folks out there know that I created a list of the DB2 tweeters I know about at &lt;a href="http://twitter.com/craigmullins/db2-folks"&gt;http://twitter.com/craigmullins/db2-folks&lt;/a&gt;.&lt;br /&gt;&lt;br /&gt;If you are a DB2 professional and I left you off the list please leave a comment here or drop me an e-mail and I'll be happy to add you.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/18371456-5947312011163192147?l=www.db2portal.com%2Fblog.html' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://www.blogger.com/feeds/18371456/5947312011163192147/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='https://www.blogger.com/comment.g?blogID=18371456&amp;postID=5947312011163192147' title='5 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/18371456/posts/default/5947312011163192147'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/18371456/posts/default/5947312011163192147'/><link rel='alternate' type='text/html' href='http://www.db2portal.com/2009/11/new-db2-twitter-list.html' title='New DB2 Twitter List'/><author><name>Craig S Mullins</name><uri>http://www.blogger.com/profile/17077237739217901780</uri><email>noreply@blogger.com</email><gd:extendedProperty xmlns:gd='http://schemas.google.com/g/2005' name='OpenSocialUserId' value='03814325010211222227'/></author><thr:total xmlns:thr='http://purl.org/syndication/thread/1.0'>5</thr:total></entry><entry><id>tag:blogger.com,1999:blog-18371456.post-919211451499393933</id><published>2009-10-30T15:47:00.000-05:00</published><updated>2009-10-30T15:54:09.152-05:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='IOD'/><category scheme='http://www.blogger.com/atom/ns#' term='Malcolm Gladwell'/><category scheme='http://www.blogger.com/atom/ns#' term='Twitter'/><category scheme='http://www.blogger.com/atom/ns#' term='IOD2009'/><title type='text'>IOD2009 Day Three – Malcolm Gladwell</title><content type='html'>Today’s blog entry is a little late seeing as how this is Friday and IOD is over, but I’m writing about Wednesday morning’s keynote session highlighted by Malcolm Gladwell.&lt;br /&gt;&lt;br /&gt;For those who do not know him, Malcolm Gladwell is a Canadian journalist and author best known as the author of the books &lt;a href="http://www.amazon.com/gp/product/0316346624?ie=UTF8&amp;amp;tag=mullinassoci-20&amp;amp;linkCode=xm2&amp;amp;camp=1789&amp;amp;creativeASIN=0316346624"&gt;The Tipping Point &lt;/a&gt;(2000), &lt;a href="http://www.amazon.com/gp/product/0316010669?ie=UTF8&amp;amp;tag=mullinassoci-20&amp;amp;linkCode=xm2&amp;amp;camp=1789&amp;amp;creativeASIN=0316010669"&gt;Blink &lt;/a&gt;(2005), and &lt;a href="http://www.amazon.com/gp/product/0316017922?ie=UTF8&amp;amp;tag=mullinassoci-20&amp;amp;linkCode=xm2&amp;amp;camp=1789&amp;amp;creativeASIN=0316017922"&gt;Outliers &lt;/a&gt;(2008). I’ve read all three of them and I highly recommend that you do, too. He also has a new book, &lt;a href="http://www.amazon.com/gp/product/0316075841?ie=UTF8&amp;amp;tag=mullinassoci-20&amp;amp;linkCode=xm2&amp;amp;camp=1789&amp;amp;creativeASIN=0316075841"&gt;What The Dog Saw&lt;/a&gt;, that I bought at the airport on the way home from IOD. I hope it is as good as the other three!&lt;br /&gt;&lt;br /&gt;Gladwell’s books deal with the unexpected implications of research in the social sciences. He spoke about some of these during his keynote session in a very entertaining and informative way. It was especially rewarding to hear him tie his messaging into the conference them of information-led transformation… and to hear him call all of the attendees mavens (read his books to understand that term).&lt;br /&gt;&lt;br /&gt;Gladwell began his talk by noting the irony of hosting a conference dealing with information analytics in Las Vegas, of all places. You would think that the casinos might have an interest in that topic!&lt;br /&gt;&lt;br /&gt;The major idea conveyed by Gladwell during his talk focused on change, and how it never occurs the way you think it will. He explained how radical changes happen much more quickly than we imagine. And he used a story about how the broadcast of a major prize fight transformed radio from a niche product to a transformative one.&lt;br /&gt;&lt;br /&gt;He also talked about reframing as being necessary to elicit major changes. Prior to broadcasting the boxing match, radio was used to deliver news and classical music. But reframing it as a product for the delivery of real-time sports coverage – reframing its use – caused major transformation. Gladwell also highlighted Apple and the iPod. The iPod was not the first portable MP3 product, but it is the most successful. Because Apple simplified the interface and promoted it simply… that is, they reframed the issue!&lt;br /&gt;&lt;br /&gt;I also enjoyed Gladwell’s story about how he purchased a laptop at CompUSA. Upon entering the store he was confronted with tables and tables of similar looking laptops and had no way to differentiate them. He tried the sales people but as anyone who ever went to CompUSA knows, they either couldn’t be found when you needed them or knew nothing about technology. So he called up his brother, who works in IT. He is not a well-known expert, but he is Malcolm’s maven – the guy he turns to for help. And he told him which laptop to purchase. Gladwell then went back to the CompUSA and he said he stood there pointing to the laptop his brother told him about. And about a half hour later the crack CompUSA salesman came to help him.&lt;br /&gt;&lt;br /&gt;This story highlighted the concept of the maven. He also mentioned that if the executives were watching how he confidently pointed to the machine he wanted that it might have led them to erroneously believe that CompUSA needed less experienced… and, indeed, fewer sales people. Which might have led to their demise.&lt;br /&gt;&lt;br /&gt;All in all, Gladwell was entertaining and informative – a very powerful combination.&lt;br /&gt;&lt;br /&gt;The other highlight of the keynote session, for me at least, was that I was mentioned by name as the most prolific &lt;a href="http://www.twitter.com/craigmullins"&gt;Twitter-er&lt;/a&gt; at the IOD conference. Now does that mean I was the most helpful or the most annoying… I’ll leave that to you all to decide.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/18371456-919211451499393933?l=www.db2portal.com%2Fblog.html' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://www.blogger.com/feeds/18371456/919211451499393933/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='https://www.blogger.com/comment.g?blogID=18371456&amp;postID=919211451499393933' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/18371456/posts/default/919211451499393933'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/18371456/posts/default/919211451499393933'/><link rel='alternate' type='text/html' href='http://www.db2portal.com/2009/10/iod2009-day-three-malcolm-gladwell.html' title='IOD2009 Day Three – Malcolm Gladwell'/><author><name>Craig S Mullins</name><uri>http://www.blogger.com/profile/17077237739217901780</uri><email>noreply@blogger.com</email><gd:extendedProperty xmlns:gd='http://schemas.google.com/g/2005' name='OpenSocialUserId' value='03814325010211222227'/></author><thr:total xmlns:thr='http://purl.org/syndication/thread/1.0'>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-18371456.post-453118227402547359</id><published>2009-10-28T00:06:00.000-05:00</published><updated>2009-10-28T00:40:43.579-05:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='smarter planet'/><category scheme='http://www.blogger.com/atom/ns#' term='IOD'/><category scheme='http://www.blogger.com/atom/ns#' term='stream computing'/><category scheme='http://www.blogger.com/atom/ns#' term='IOD2009'/><category scheme='http://www.blogger.com/atom/ns#' term='Oracle versus DB2'/><title type='text'>IOD2009 Day Two</title><content type='html'>Day two of the IBM Information on Demand conference was just as informative and exciting as day one. The day kicked off with a general session titled "A New Kind of Intelligence for a Smarter Planet." The idea presented is that the world is changing. It is becoming more instrumented, interconnected, and intelligent. Basically, as Steve Mills of IBM clarified, &lt;span class="status-body"&gt;&lt;span class="entry-content"&gt;the ability to embed intelligence into millions of things will lead the transformation to an information led smarter planet&lt;/span&gt;&lt;/span&gt;. And that this information-led transformation will create opportunities for organizations to strategically gain control of information and create a new kind of intelligence.&lt;br /&gt;&lt;br /&gt;&lt;span class="status-body"&gt;&lt;span class="entry-content"&gt;Expanded intelligence begins with sensors and metering, which is doable today because price points have become reasonable now. There are 1 billion transistors per human, today. And an estimated 2 billion people will soon be on the Internet. At the same time, we are moving toward one trillion connected objects (video cameras, GPS devices, healthcare instruments, and even &lt;/span&gt;&lt;/span&gt;livestock). And there are hundreds of satellites orbiting the Earth, generating terabytes of data each and every day.&lt;br /&gt;&lt;br /&gt;As we begin to intelligently interconnect these devices and analyze their streaming data, a transformative opportunity can results...&lt;br /&gt;&lt;br /&gt;IBM brought up three customers to talk about how their organization were helping to transform to a smarter planet. The customers came from Cardinal Health, Statoil Hydro ASA (Norway), and the Food and Drug Administration. Highlights of the panel discussion:&lt;br /&gt;&lt;ol class="statuses" id="timeline"&gt;&lt;li class="hentry u-craigmullins mine status last-on-page" id="status_5203658903"&gt;&lt;span class="status-body"&gt;&lt;span class="entry-content"&gt;Security in the supply chain for food is absolutely critical and food safety is one of the most complex systems to deal with.&lt;/span&gt;&lt;/span&gt;&lt;/li&gt;&lt;li class="hentry u-craigmullins mine status last-on-page" id="status_5203658903"&gt;&lt;span class="status-body"&gt;&lt;span class="entry-content"&gt;&lt;span style="text-decoration: underline;"&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class="meta entry-meta"&gt;&lt;a href="http://twitter.com/craigmullins/status/5203686851" class="entry-date" rel="bookmark"&gt;&lt;span class="published timestamp" data="{time:'Tue Oct 27 15:55:15 +0000 2009'}"&gt;&lt;/span&gt;&lt;/a&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class="actions"&gt;&lt;/span&gt;The &lt;span class="status-body"&gt;&lt;span class="entry-content"&gt;US imports 50pct of its food - from over 150 different countries.&lt;br /&gt;&lt;/span&gt;&lt;/span&gt;&lt;/li&gt;&lt;li class="hentry u-craigmullins mine status last-on-page" id="status_5203658903"&gt;&lt;span class="status-body"&gt;&lt;span class="entry-content"&gt;Every food supplier to US (domestic or foreign) must be registered with the FDA. &lt;/span&gt;&lt;/span&gt;&lt;br /&gt;&lt;span class="status-body"&gt;&lt;span class="entry-content"&gt;&lt;/span&gt;&lt;/span&gt;&lt;/li&gt;&lt;li class="hentry u-craigmullins mine status last-on-page" id="status_5203658903"&gt;&lt;span class="status-body"&gt;&lt;span class="entry-content"&gt;And each supplier must complete forms as to the safety of its food. This can be difficult since suppliers range from large agri-businesses to small farms many of whom do not have a computer at all. So some records are probably kept on paper in shoe boxes.&lt;br /&gt;&lt;/span&gt;&lt;/span&gt;&lt;/li&gt;&lt;li class="hentry u-craigmullins mine status last-on-page" id="status_5203658903"&gt;&lt;span class="status-body"&gt;&lt;span class="entry-content"&gt;Supply chain security is very important in the health care (drugs) and oil industries too! In fact, it was discussed how each of these seemingly disparate industries face many similar challenges.&lt;/span&gt;&lt;/span&gt;&lt;/li&gt;&lt;li class="hentry u-craigmullins mine status" id="status_5204183248"&gt;&lt;span class="status-body"&gt;&lt;span class="entry-content"&gt;&lt;a href="http://twitter.com/search?q=%23IOD2009" title="#IOD2009" class="tweet-url hashtag"&gt;&lt;/a&gt;Preventing problems requires understanding risk. And complexity requires collaboration in order to succeed becase nobody has enough resources to do it all alone.&lt;/span&gt;&lt;/span&gt;&lt;span class="actions"&gt;&lt;/span&gt;&lt;/li&gt;&lt;li class="hentry u-craigmullins mine status" id="status_5203971293"&gt;&lt;span class="status-body"&gt;&lt;span class="entry-content"&gt;In some areas (such as remote parts of Norway) instrumentation is essential to even get the data because nobody wants to go there.&lt;/span&gt;&lt;/span&gt;&lt;span class="actions"&gt;&lt;span style="text-decoration: underline;"&gt;&lt;/span&gt;&lt;/span&gt;&lt;/li&gt;&lt;li class="hentry u-craigmullins mine status" id="status_5203971293"&gt;&lt;span class="actions"&gt;&lt;span style="text-decoration: underline;"&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class="status-body"&gt;&lt;span class="entry-content"&gt;&lt;a href="http://twitter.com/search?q=%23IOD2009" title="#IOD2009" class="tweet-url hashtag"&gt;&lt;/a&gt;Legacy systems often are rich sources of information (hey, that probably means mainframes!)&lt;/span&gt;&lt;span class="meta entry-meta"&gt;&lt;span&gt;&lt;/span&gt; &lt;/span&gt;&lt;/span&gt;&lt;span class="del"&gt;&lt;/span&gt;&lt;/li&gt;&lt;li class="hentry u-craigmullins mine status" id="status_5203971293"&gt;&lt;span class="del"&gt;A&lt;/span&gt;&lt;span class="entry-content"&gt;nalytics are required for prevention of problems, but also aid in reaction to problems that actually occur too. No one prevents 100 percent of their problems.&lt;/span&gt;&lt;/li&gt;&lt;/ol&gt;&lt;span class="status-body"&gt;&lt;span class="entry-content"&gt;After the panel IBM came back and wrapped it up. They mentioned how IBM was awarded the National Medal of Honor for their Blue Gene supercomputer for DNA sequencing. It was a very informative and entertaining general session.&lt;br /&gt;&lt;br /&gt;I then attended the DB2 9.7 versus Oracle 11g Smackdown presentation. It was chock full of statistics on why IBM's DB2 is superior to Oracle in terms of cost. The presenter explained how DB2 &lt;/span&gt;&lt;/span&gt;&lt;span class="status-body"&gt;&lt;span class="entry-content"&gt;outperforms Oracle on TPC-C benchmarks for the same test, on the same machine, at the same point in time.&lt;/span&gt;&lt;/span&gt; He cautioned folks to &lt;span class="status-body"&gt;&lt;span class="entry-content"&gt;to read the small print details on all benchmark results... for example, if you are examining the cost of ownership double check to see whether the benchmark uses a term or full purchase license. Also,&lt;/span&gt;&lt;/span&gt;&lt;span class="entry-content"&gt; the cost of the database license depends a great deal on your ability to negotiate a discount (if the vendor will  discount). And you also need to be aware of how the products are licensed. S&lt;/span&gt;&lt;span class="status-body"&gt;&lt;span class="entry-content"&gt;ome features are separately licensed for both DB2 and Oracle. The bottom line is that l&lt;/span&gt;&lt;/span&gt;&lt;span class="status-body"&gt;&lt;span class="entry-content"&gt;icensing can cause a more than 30 percentt swing in price performance results&lt;br /&gt;&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;But do people even believe these benchmarks any more? I don't think very many people put much stock in benchmark tests today.&lt;br /&gt;&lt;br /&gt;The author frequently cited an independent study by ITG that compares the value proposition of DB2 9.7 versus Oracle Database 11g. You can read the study yourself &lt;a href="ftp://ftp.software.ibm.com/common/ssi/sa/wh/n/iml14187usen/IML14187USEN.PDF"&gt;at this link&lt;/a&gt;.&lt;br /&gt;&lt;br /&gt;(Note to my regular z/OS readers: the previous discussion was all about DB2 LUW and not DB2 for z/OS).&lt;br /&gt;&lt;br /&gt;I also got to attend a special briefing for bloggers on IBM's new stream computing solution, which I blogged about on my &lt;a href="http://www.neonesoft.com/blog/blogs/cmullins/archive/2009/10/27/InfoSphere-Streams_3A00_-Analyzing-Any-Data_2C00_-Anywhere_2C00_-All-the-Time-_2800_IOD2009_2900_.aspx"&gt;Data Management Today blog if you are interested&lt;/a&gt;.&lt;br /&gt;&lt;br /&gt;And finally, I'll plug my Twitter feed again. You can follow my tweets at IOD this week (well, thru Wednesday) by following me on Twitter at &lt;a href="http://www.twitter.com/craigmullins"&gt;http://www.twitter.com/craigmullins&lt;/a&gt;.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/18371456-453118227402547359?l=www.db2portal.com%2Fblog.html' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://www.blogger.com/feeds/18371456/453118227402547359/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='https://www.blogger.com/comment.g?blogID=18371456&amp;postID=453118227402547359' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/18371456/posts/default/453118227402547359'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/18371456/posts/default/453118227402547359'/><link rel='alternate' type='text/html' href='http://www.db2portal.com/2009/10/iod2009-day-two.html' title='IOD2009 Day Two'/><author><name>Craig S Mullins</name><uri>http://www.blogger.com/profile/17077237739217901780</uri><email>noreply@blogger.com</email><gd:extendedProperty xmlns:gd='http://schemas.google.com/g/2005' name='OpenSocialUserId' value='03814325010211222227'/></author><thr:total xmlns:thr='http://purl.org/syndication/thread/1.0'>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-18371456.post-1361301173248462569</id><published>2009-10-26T17:15:00.000-05:00</published><updated>2009-10-26T18:07:36.674-05:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='Information Agenda'/><category scheme='http://www.blogger.com/atom/ns#' term='IBM'/><category scheme='http://www.blogger.com/atom/ns#' term='DB2 X'/><category scheme='http://www.blogger.com/atom/ns#' term='IOD'/><category scheme='http://www.blogger.com/atom/ns#' term='IOD2009'/><title type='text'>IBM IOD2009 Day One</title><content type='html'>It is Monday, October 26, 2009, and the annual IBM Information on Demand (IOD2009) conference is officially underway. Well, actually it kicked off with a bang on Sunday. The exhibition hall opened at 6:00 pm and the early goers traipsed through the vendor hall sharing stories, checking out the vnedor's wares, and looking for the latest tschotskes (the favorites seem to be a mini-book light being given out by SPSS and the nifty DB2 t-shirts being given out by &lt;a href="http://www.segus.com/"&gt;SEGUS, Inc.&lt;/a&gt;).&lt;br /&gt;&lt;br /&gt;But the event really does not get started (at least as far as I'm concerned) until the big Monday morning kickoff, which this year was emceed by &lt;a href="http://www.terryfator.com/"&gt;Terry Fator&lt;/a&gt; (the ventriloquist impersonator who won America's Got Talent) last year. He did a very nice job, and his mimicry and ventriloquism skills are great... but I think ventriloquism works better in a more intimate setting.&lt;br /&gt;&lt;br /&gt;Before Terry came on an IBMer shared several tidbits of data from research and from polls they have been taking at IOD. For example, did you know that&lt;span class="entry-content"&gt; 15 petabytes of data are created every day? Regarding the even, they shared that there are more overall attendees here than there were at last year's event (6,000+) and that t&lt;/span&gt;&lt;span class="del"&gt;&lt;/span&gt;&lt;span class="entry-content"&gt;he average distance folks traveled to attend &lt;a href="http://twitter.com/search?q=%23IOD2009" title="#IOD2009" class="tweet-url hashtag"&gt;#IOD2009&lt;/a&gt; is 2500 miles.&lt;/span&gt; You can actually participate in the daily IOD polls at &lt;a href="http://iodpoll.com/preevent_final.cfm"&gt;http://iodpoll.com&lt;/a&gt;.&lt;br /&gt;&lt;br /&gt;In between the entertainment respites, we got to hear from several IBM folks, including Ambuj Goyal, Arvind Krishna, and Frank Kern. According to Mr. Goyal, IBM is building an information on demand software stack to deliver trusted information. This can solve a very real problem that organizations are experiencing today. You see, it seems that one in three business leaders frequently make critical decisions based on inaccurate or non-existing information. Business executives don't just need data, but trusted information that can be relied upon for analysis to make accurate business decisions.&lt;br /&gt;&lt;br /&gt;Again, according to Goyal, he sees IBM's &lt;a href="http://www-01.ibm.com/software/data/information-agenda/"&gt;Information Agenda &lt;/a&gt;doing for trusted information what ERP did for enterprise resource processes. &lt;span class="entry-content"&gt;IBM will help move its customers from information projects to information-based architecture and operations, moving organizations from information on demand to information transformation.&lt;br /&gt;&lt;/span&gt;&lt;br /&gt;Then Frank Kern hosted three IBM customers as he asked each of them to explain how they benefited from IBM's Information Management solutions. The representative from BlueCross BlueShield talked about their data warehouse with &lt;span class="status-body"&gt;&lt;span class="entry-content"&gt;54 millions records, which happens to be the largest healthcare data warehouse in the world. Their a&lt;/span&gt;&lt;/span&gt;&lt;span class="entry-content"&gt;nalytical data is made available thru a portal. Offering integrated healthcare details helps improve healthcare. And the Chevron representative spoke about how IBM has helped Chevron improve &lt;/span&gt;&lt;span class="entry-content"&gt;its supply chain operations using integrated information. &lt;/span&gt;&lt;span class="actions"&gt;&lt;br /&gt;&lt;br /&gt;And &lt;/span&gt;&lt;span class="entry-content"&gt;Arvind Krishna, GM of the Information Management group at IBM, told about IBM's on-going investments in research and development for IOD. So far, IBM has invested over $12 billion in R+D and acquisitions.&lt;br /&gt;&lt;/span&gt;&lt;br /&gt;IBM also unveiled some announcements today at IOD including several new offerings to provide organizations with analytics capabilities to make better use of their archived information and improve business processes. These offerings are part of IBM's unified archiving strategy called IBM Smart Archive. Most intriguing to me is the preview of a SaaS offering called IBM Information Archive Cloud Services. The entire press release can be read &lt;a href="http://www-03.ibm.com/press/us/en/pressrelease/28687.wss"&gt;here&lt;/a&gt;, if you're interested in the topic.&lt;br /&gt;&lt;br /&gt;I also attended a presentation on DB2 X which was quite interesting, too. Delivered by Jeff Josten, there was much good news for mainframe DB2 folks including improved performance, temporal support, improved utility operations, hashed data and access paths, and more. &lt;a href="http://twitter.com/#search?q=%23IOD2009%20%23DB2X"&gt;I tweeted about this quite extensively on Twitter&lt;/a&gt;.&lt;br /&gt;&lt;br /&gt;In fact, if you want to follow my tweets all week (well, thru Wednesday) be sure to follow me on Twitter at &lt;a href="http://www.twitter.com/craigmullins"&gt;http://www.twitter.com/craigmullins&lt;/a&gt;... even when I'm not at a conference like IOD, I regularly tweet on DB2, database, and information management topics.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/18371456-1361301173248462569?l=www.db2portal.com%2Fblog.html' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://www.blogger.com/feeds/18371456/1361301173248462569/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='https://www.blogger.com/comment.g?blogID=18371456&amp;postID=1361301173248462569' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/18371456/posts/default/1361301173248462569'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/18371456/posts/default/1361301173248462569'/><link rel='alternate' type='text/html' href='http://www.db2portal.com/2009/10/ibm-iod2009-day-one.html' title='IBM IOD2009 Day One'/><author><name>Craig S Mullins</name><uri>http://www.blogger.com/profile/17077237739217901780</uri><email>noreply@blogger.com</email><gd:extendedProperty xmlns:gd='http://schemas.google.com/g/2005' name='OpenSocialUserId' value='03814325010211222227'/></author><thr:total xmlns:thr='http://purl.org/syndication/thread/1.0'>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-18371456.post-2078620918237332597</id><published>2009-10-19T11:15:00.001-05:00</published><updated>2009-10-19T11:20:32.448-05:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='mainframe'/><category scheme='http://www.blogger.com/atom/ns#' term='DB2 X'/><title type='text'>Hear Ye, Hear Ye, Learn All About DB2 X for z/OS</title><content type='html'>IBM is hosting a free webinar on November 3, 2009, offering a technical preview of the next version of DB2 for z/OS, currently known as DB2 X (but we all know, err, ah, think it will be called DB2 10).&lt;br /&gt;&lt;p&gt;If you work with DB2 on the mainframe you will want to set aside some time to attend this informative DB2 X webinar. It will have information for DBAs, as well as for Managers, Application Architects, Developers, System Administrators, System Programmers, and System Architects... and that is just about anyone who works with DB2.&lt;/p&gt;&lt;p&gt;The speaker will be IBM Distinguished Engineer, Jeff Josten.&lt;/p&gt;&lt;p&gt;How do you participate, you may be asking? Well, that is easy. Simply click on over to &lt;a href="http://www-01.ibm.com/software/os/systemz/telecon/nov3/index.html?S_TACT=109AY49M&amp;amp;S_CMP=5x5"&gt;&lt;b&gt;DB2 X for z/OS Technical Preview&lt;/b&gt;&lt;/a&gt; and register&lt;b&gt; &lt;/b&gt;yourself.&lt;/p&gt;&lt;p&gt;The webinar will be held on November 3, 2009 at 11:00 a.m. Eastern Standard Time, 4:00 p.m. UTC.&lt;/p&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/18371456-2078620918237332597?l=www.db2portal.com%2Fblog.html' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://www.blogger.com/feeds/18371456/2078620918237332597/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='https://www.blogger.com/comment.g?blogID=18371456&amp;postID=2078620918237332597' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/18371456/posts/default/2078620918237332597'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/18371456/posts/default/2078620918237332597'/><link rel='alternate' type='text/html' href='http://www.db2portal.com/2009/10/hear-ye-hear-ye-learn-all-about-db2-x.html' title='Hear Ye, Hear Ye, Learn All About DB2 X for z/OS'/><author><name>Craig S Mullins</name><uri>http://www.blogger.com/profile/17077237739217901780</uri><email>noreply@blogger.com</email><gd:extendedProperty xmlns:gd='http://schemas.google.com/g/2005' name='OpenSocialUserId' value='03814325010211222227'/></author><thr:total xmlns:thr='http://purl.org/syndication/thread/1.0'>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-18371456.post-6389567907070498842</id><published>2009-10-12T14:46:00.000-05:00</published><updated>2009-10-12T15:06:18.935-05:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='data quality'/><category scheme='http://www.blogger.com/atom/ns#' term='data types'/><category scheme='http://www.blogger.com/atom/ns#' term='integrity'/><title type='text'>On The Importance of Choosing the Correct Data Type</title><content type='html'>Most DBAs have grappled with the pros and cons of choosing one data type versus another. Sometimes the decision is easy, whereas sometimes the decision is a little bit more difficult. In today's blog entry, we'll discuss both situations.&lt;br /&gt;&lt;br /&gt;Data type and length are the most fundamental integrity constraints applied to data in a database. Simply by specifying the data type for each column when a table is created, DB2 automatically ensures that only the correct type of data is stored in that column. Processes that attempt to insert or update the data to a non-conforming value will be rejected. Furthermore, a maximum length is assigned to the column to prohibit larger values from being stored in the table.&lt;br /&gt;&lt;br /&gt;The DBA must choose the data type and length of each column wisely. The general rule of thumb for choosing a data type for the columns in your tables is to choose the data type that most closely matches the domain of correct values for the column. That means you should try to adhere to the following rules:&lt;br /&gt;&lt;ul&gt;&lt;li&gt;If the data is numeric, favor SMALLINT, INTEGER, BIGINT, or DECIMAL data types. DECFLOAT and FLOAT are also options for very large numbers.&lt;/li&gt;&lt;li&gt;If the data is character, use CHAR or VARCHAR data types.&lt;/li&gt;&lt;li&gt;If the data is date and time, use DATE, TIME, and TIMESTAMP data types.&lt;/li&gt;&lt;li&gt;If the data is multimedia, use GRAPHIC, VARGRAPHIC, BLOB, CLOB, or DBCLOB data types.&lt;/li&gt;&lt;/ul&gt;But, of course, there are always exceptions. For example, what about social security number? That is a numeric column, but you won't be performing calculations using it. And, to format it correctly requires hyphens, which cannot be stored in a numeric data type. So, perhaps, SSN is an exception.&lt;br /&gt;&lt;br /&gt;&lt;span style="font-weight: bold;"&gt;Leading Zeroes&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;Let's consider another typical situation: the desire to display leading zeroes. Maybe the application requires a four-byte code that is used to identify products, accounts, or some other business object, and all of the codes are numeric and will stay that way. But, for reporting purposes, the users want the codes to print out with leading zeroes. So, the users request that the column be defined as CHAR(4) to ensure that leading zeroes are always shown. But what are the drawbacks of doing this?&lt;br /&gt;&lt;br /&gt;Well, there are drawbacks! Without proper edit checks, inserts and updates could place invalid alphabetic characters into the product code. This can be a very valid concern if ad hoc data modifications are permitted. This is rare in production databases, but data problems can still occur if the proper edit checks are not coded into every program that can modify the data. But let's assume that proper edit checks are coded and will never be bypassed. This removes the data integrity question (&lt;span style="font-style: italic;"&gt;yeah, right!&lt;/span&gt;).&lt;br /&gt;&lt;br /&gt;There is another problem that is related to performance and filter factors. Consider the possible number of values that a CHAR(4) column and a SMALLINT column can assume. Even if edit checks are coded for each, DB2 is not aware of these and assumes that all combinations of characters are permitted. DB2 uses base 37 math when it determines access paths for character columns, under the assumption that 26 alphabetic letters, 10 numeric digits, and a space will be used. This adds up to 37 possible characters. For a four-byte character column there are 374 or 1,874,161 possible values.&lt;br /&gt;&lt;br /&gt;A SMALLINT column can range from -32,768 to 32,767 producing 65,536 possible small integer values. The drawback here is that negative or 5 digit product codes could be entered. However, if we adhere to our proper edit check assumption, the data integrity problems will be avoided here, as well. And we can always code a simple CHECK constraint to ensure that the code is always greater than zero.&lt;br /&gt;&lt;br /&gt;DB2 will use the HIGH2KEY and LOW2KEY values to calculate filter factors. For character columns, the range between HIGH2KEY and LOW2KEY is larger than numeric columns because there are more total values. The filter factor will be larger for the numeric data type than for the character data type which may influence DB2 to choose a different access path. For this reason, favor the SMALLINT over the CHAR(4) definition.&lt;br /&gt;&lt;br /&gt;The leading zeroes problem might be able to be solved using other methods. If you are using a report writer, most of them have quick methods of displaying leading zeroes. When using QMF, you can ensure that leading zeroes are shown by using the "J" edit code. Report programs can be coded to display leading zeroes easily enough by moving the host variables to appropriate display fields. Ad hoc access through other reporting tools typically provide a parameter that can enable leading zeroes to be displayed.&lt;br /&gt;&lt;br /&gt;In general, it is wise to choose a data type which is closest to the domain for the column. IF the column is to store numeric data, favor choosing a numeric data type: SMALLINT, INTEGER, DECIMAL, or floating point. In addition, always be sure to code appropriate edit checks to ensure data integrity.&lt;br /&gt;&lt;br /&gt;&lt;span style="font-weight: bold;"&gt;A DATE with DB2&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;What about dates? In my opinion, you should always use a DATE data type for date data. Why anyone would ever store a date or time in a DB2 table any other format than DATE, TIME, or TIMESTAMP is beyond me. But, oh, they do it all the time. And it causes all sorts of headaches. The benefits of using the proper DB2 data type are many, including:&lt;br /&gt;&lt;ul&gt;&lt;li&gt;Ensuring data integrity because DB2 will ensure that only valid date and time values are stored &lt;/li&gt;&lt;li&gt;The ability to use date and time arithmetic &lt;/li&gt;&lt;li&gt;A vast array of built-in functions to operate on and transform date and time values &lt;/li&gt;&lt;li&gt;Multiple formatting choices &lt;/li&gt;&lt;/ul&gt;Additionally, you have multiple built-in functions at your disposal for manipulating date and time data, but only when the data is stored as DATE, TIME, and TIMESTAMP data types. The time-related DB2 functions include CHAR, DATE, DAY, DAYOFMONTH, DAYOFWEEK, DAYOFYEAR, DAYS, HOUR, JULIAN_DAY, MICROSECOND, MIDNIGHT_SECONDS, MINUTE, MONTH, QUARTER, SECOND, TIME, TIMESTAMP, WEEK, WEEK_ISO, and YEAR.&lt;br /&gt;&lt;br /&gt;I get questions all the time from folks who've stored dates using character data types; they ask all kinds of integrity and manipulation questions and I always, always, always start my reply with "You shouldn't have done that!"... and then I try to help them out, if I can. Don't fall into the trap of storing dates using anything but a DATE data type... you'll thank me later.&lt;br /&gt;&lt;br /&gt;&lt;span style="font-weight: bold;"&gt;Summary&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;There is a lot more that can be said about choosing appropriate data types, but I think we've covered enough for today. The bottom line on data types is to use them to protect the integrity of your DB2 data and to simplify your job by taking advantage of DB2’s built-in capabilities. By choosing that data type that most closely matches your data you will be doing yourself, your systems, and your users a big favor.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/18371456-6389567907070498842?l=www.db2portal.com%2Fblog.html' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://www.blogger.com/feeds/18371456/6389567907070498842/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='https://www.blogger.com/comment.g?blogID=18371456&amp;postID=6389567907070498842' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/18371456/posts/default/6389567907070498842'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/18371456/posts/default/6389567907070498842'/><link rel='alternate' type='text/html' href='http://www.db2portal.com/2009/10/on-importance-of-choosing-correct-data.html' title='On The Importance of Choosing the Correct Data Type'/><author><name>Craig S Mullins</name><uri>http://www.blogger.com/profile/17077237739217901780</uri><email>noreply@blogger.com</email><gd:extendedProperty xmlns:gd='http://schemas.google.com/g/2005' name='OpenSocialUserId' value='03814325010211222227'/></author><thr:total xmlns:thr='http://purl.org/syndication/thread/1.0'>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-18371456.post-5241874711678976710</id><published>2009-10-02T09:11:00.000-05:00</published><updated>2009-10-02T09:15:54.308-05:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='IDUG'/><category scheme='http://www.blogger.com/atom/ns#' term='Twitter'/><title type='text'>IDUG Europe is Right Around the Corner</title><content type='html'>Just a quick post today to remind everybody that the annual &lt;a href="http://www.idug.org/idug-2009-europe/index.html"&gt;European IDUG conference&lt;/a&gt; will be held next week (the week of October 5, 2009) in Rome, Italy. And it is not too late to ensure that you will be there to hear the latest and greatest news, tips, tricks, and guidelines on our favorite DBMS - IBM's DB2!&lt;br /&gt;&lt;br /&gt;For those of you not lucky enough to be there keep an eye on my DB2portal blog here where I will attempt to summarize the key events of the week.&lt;br /&gt;&lt;br /&gt;And if you are a Twitter aficionado, be sure to &lt;a href="http://twitter.com/craigmullins"&gt;follow me on Twitter&lt;/a&gt; as I will try to make regular Tweets about the event (as long as my Blackberry works in Rome).&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/18371456-5241874711678976710?l=www.db2portal.com%2Fblog.html' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://www.blogger.com/feeds/18371456/5241874711678976710/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='https://www.blogger.com/comment.g?blogID=18371456&amp;postID=5241874711678976710' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/18371456/posts/default/5241874711678976710'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/18371456/posts/default/5241874711678976710'/><link rel='alternate' type='text/html' href='http://www.db2portal.com/2009/10/idug-europe-is-right-around-corner.html' title='IDUG Europe is Right Around the Corner'/><author><name>Craig S Mullins</name><uri>http://www.blogger.com/profile/17077237739217901780</uri><email>noreply@blogger.com</email><gd:extendedProperty xmlns:gd='http://schemas.google.com/g/2005' name='OpenSocialUserId' value='03814325010211222227'/></author><thr:total xmlns:thr='http://purl.org/syndication/thread/1.0'>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-18371456.post-7371076744168340581</id><published>2009-09-24T22:56:00.000-05:00</published><updated>2009-10-02T09:24:05.659-05:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='FETCH FIRST'/><category scheme='http://www.blogger.com/atom/ns#' term='DB2 9'/><category scheme='http://www.blogger.com/atom/ns#' term='Top Ten'/><title type='text'>Limiting the Number of Rows Fetched</title><content type='html'>Application developers frequently need to retrieve a limited number of qualifying rows from a table. For example, maybe you need to list the top ten best selling items from inventory, or a list of the top five most expensive products (i.e., highest price tag). There are several ways to accomplish this prior to DB2 V7 using SQL, but they are not necessarily efficient.&lt;br /&gt;&lt;br /&gt;The first reaction is to simply use the WHERE clause to eliminate non-qualifying rows. But this is simplistic, and often is not sufficient to produce the results desired in an optimal manner. What if the program only requires that the top ten results be returned? This can be a somewhat difficult request to formulate using SQL alone. &lt;br /&gt;&lt;br /&gt;Consider, for example, an application that needs to retrieve only the top ten most highly paid employees from the EMP sample table. You could simply issue a SQL request that retrieves all of the employees in order by salary, but only use the first ten retrieved. That is easy; for example:&lt;br /&gt;&lt;br /&gt;EMPNO, FIRSTNME, LASTNAME, SALARY&lt;br /&gt;FROM DSN8710.EMP&lt;br /&gt;ORDER BY SALARY DESC;&lt;br /&gt;&lt;br /&gt;You must specify the ORDER BY clause with the DESC key word. This sorts the results into descending order, instead of the default, which is ascending. Without the DESC key word, the "top ten" would be at the very end of the results set, not at the beginning.&lt;br /&gt;&lt;br /&gt;But that does not really satisfy the requirement - retrieving only the top ten. It merely sorts the results into descending sequence. So the results would still be all employees in the table, but in the correct order so you can view the "top ten" salaries very easily. The ideal solution should return only the top ten employees with the highest salary and not merely a sorted list of all employees.&lt;br /&gt;&lt;br /&gt;You can code some "tricky" SQL to support this request for all versions of DB2, such as the following:&lt;br /&gt;&lt;br /&gt;SELECT EMPNO, FIRSTNME, LASTNAME, SALARY&lt;br /&gt;FROM DSN8710.EMP A&lt;br /&gt;WHERE 10 &gt; (SELECT COUNT(*)&lt;br /&gt;            FROM DSN8710.EMP B&lt;br /&gt;            WHERE A.SALARY &lt; B.SALARY)&lt;br /&gt;AND SALARY IS NOT NULL&lt;br /&gt;ORDER BY SALARY DESC;&lt;br /&gt;&lt;br /&gt;This SQL is portable from DB2 to other DBMSs, such as Oracle or SQL Server. And, of course, you can change the constant 10 to any number you wish, thereby retrieving the top 20, or top 5, as deemed necessary by the needs of your application. &lt;br /&gt;&lt;br /&gt;Since the SALARY column is nullable in the EMP table, you must remove the nulls from the results set. And the ORDER BY is required to sort the results in the right order. If it is removed from the query, the results will still contain the top ten, but they will be in no particular order.&lt;br /&gt;&lt;br /&gt;But DB2, as of V7, provides an easier and less complicated way to limit the results of a SELECT statement - the FIRST key word. You can code FETCH FIRST n ROWS which will limit the number of rows that are fetched and returned by a SELECT statement. &lt;br /&gt;&lt;br /&gt;Additionally, you can specify a new clause -- FETCH FIRST ROW ONLY clause -- on SELECT INTO statements when the query can return more than one row in the answer set. Doing so informs DB2 to ignore the other rows.&lt;br /&gt;&lt;br /&gt;There is one difference between the new V7 formulation and the other SELECT statement we reviewed, and that is the way "ties" are handled. A tie occurs when more than one row contains the same value. The previous query we examined may return more than 10 rows if there are multiple rows with the same value for price within the top ten.&lt;br /&gt;&lt;br /&gt;Using the FIRST key word DB2 will limit the number of rows returned to ten, even if there are other rows with the same value for price as the number ten row in the results set. The needs of your application will dictate whether ties are to be ignored or included in the result set. If all "ties" need to be included in the results set, which would mean that more than 10 rows would be needed, the new V7 feature may not prove to be helpful.&lt;br /&gt;&lt;br /&gt;And it is also important to note that as of DB2 9, you can include the FETCH FIRST clause in a subselect. ORDER BY is allowed in a subselect, too. The subselect MUST be enclosed in parentheses and the FETCH FIRST (or ORDER BY) cannot be in the outermost fullselect of a view, or in a materialized query table.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/18371456-7371076744168340581?l=www.db2portal.com%2Fblog.html' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://www.blogger.com/feeds/18371456/7371076744168340581/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='https://www.blogger.com/comment.g?blogID=18371456&amp;postID=7371076744168340581' title='4 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/18371456/posts/default/7371076744168340581'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/18371456/posts/default/7371076744168340581'/><link rel='alternate' type='text/html' href='http://www.db2portal.com/2009/09/limiting-number-of-rows-fetched.html' title='Limiting the Number of Rows Fetched'/><author><name>Craig S Mullins</name><uri>http://www.blogger.com/profile/17077237739217901780</uri><email>noreply@blogger.com</email><gd:extendedProperty xmlns:gd='http://schemas.google.com/g/2005' name='OpenSocialUserId' value='03814325010211222227'/></author><thr:total xmlns:thr='http://purl.org/syndication/thread/1.0'>4</thr:total></entry></feed>