Wednesday, January 20, 2021

A New "Routine" Habit for the New Year?

 

Welcome to 2021! I hope that everyone’s new year is off to a good start.  A new year often brings discussion of regeneration and rebooting to start the year with a clean slate when it comes to developing good habits or dropping bad habits.

In the spirit of developing new habits for the new year, you may want to look into starting the habit of regular regeneration of your SQL routines.  When an SQL function, procedure, or trigger objects gets created, you may or may know that behind the scenes Db2 generates a C program with embedded SQL to implement the specified SQL procedural logic.  The efficiency of the program generation can have a direct impact on the runtime performance of your SQL routines.  As part of the code generation process, Db2 tries to implement some assignments and comparisons statements with pure C code to get the best performance.

Over time, the smart developers in Rochester have expanded Db2 for i’s ability to generate pure C code in more situations to speed up the performance of your SQL functions, procedures, and triggers.  However, your SQL routines can only benefit from the C code generation enhancements when they are recreated with the newer version of Db2 for i.  This article shows you can how you can query the system catalogs to identify those SQL routines that have not been recreated in a while.  Or you could just choose to recreate all of your SQL routines since that’s a relatively easy operation to try to see if it improves performance?

Hopefully, I’ve convinced you to add regular SQL routine recreation after Db2 for i updates to list of new habits to develop in the new year since it’s such a simple operation that may deliver faster performance.

Friday, December 11, 2020

Old Habits Die Hard, even QTEMP ones

As the old adage says, old habits die hard.  I have experienced this firsthand since returning to the IBM i world a couple of months ago.  While I was off working on Watson, IBM reached into its marketing bag of tricks and “changed” the name of its relational database product from DB2 to Db2.  If I had a nickel for every time that I’ve typed DB2 instead of Db2 since my return, I could use that money to take my wife out for a really nice meal; that assumes restaurants being open here in Minnesota, but I digress…

Another old habit that I’ve seen still being used in the IBM i world is copying data into QTEMP and then running SQL against this temporary copy.  There are certain aspects of this QTEMP approach that are beneficial, but there’s a real dark side, to use a Star Wars analogy, from a performance perspective that should be not ignored.   I’ve written this article to highlight the reasons why IBM i developers should consider ending their QTEMP habit.

The good news is that SQL has several different features that allow you to get the benefits of the QTEMP approach without the performance overhead.   If you or your team need any help with a New Year’s resolution in 2021 to break the QTEMP habit with advanced SQL, then let me know.

Have a Merry Christmas and wonderful holiday season, I look forward to talking with all of you in 2021! 

Friday, November 13, 2020

Db2 for i Comings & Goings

 As you might have guessed from the quietness of this blog, Mike Cain, my good friend and long-time Db2 partner in crime retired from IBM last year and is happily enjoying retirement.  

And if you haven’t heard yet, I returned to the IBM i world this Fall after a 5-year stint working on healthcare solutions powered by IBM Watson technologies. I’m excited to be back working work with the Db2 team in the IBM Lab Services Power Systems Delivery Practice where I get to help clients get the most out of Db2 and SQL on IBM i.  With my return, I’ll be using this blog to raise awareness about all things related to Db2 for i. 

Speaking of new things in Db2 land, today there are new IBM i technology refreshes available for the 7.3 and 7.4 releases that as always include numerous Db2 enhancements.  My favorite is the new IF EXISTS clause for DROP statements which can be used to greatly simplify your SQL database creation scripts – you can learn about how to use this feature in my article.  A complete list of all the Db2 and IBM i enhancements in the latest technology refresh can be found here.   

It's good to be back!

Friday, April 13, 2018

Data: The New Currency

In this month's issue of the IBM Systems Magazine - POWER edition, author Neil Tardy shares some observations and insights on the importance of realizing maximum value from data through collaboration.

If you have not already read the piece, you can check it out here.

I highly recommend you share it with your business leaders and executives, taking advantage of the opportunity to discuss and reevaluate your collection and use of data.

Please reach out to me if you need assistance with the conversation, and as you persevere to do more, and do better.


Monday, December 4, 2017

Making the Case for a Database Engineer - Again


Recently, I collaborated with IBM Systems Magazine author Neil Tardy to reiterate the importance, and the value of standing up an IBM i database engineer. The end result of this collaboration is a simple but profound article that once again, makes the case for the Db2 for i DBE.

Take a few minutes to read Neil's article, and then share it.  Use it at as a good excuse to call on your managers and executives.  Deliver a message.

If you need help in communicating the message, or convincing them of the urgency, please reach out, I am more than happy to help illuminate this important topic.

Mr. Tardy's article can be found here, in the December 2017 issue of IBM Systems Magazine.

Tuesday, October 3, 2017

Interesting Db2 items in the latest TR!


Today, IBM announces the latest IBM i 7.2 and IBM i 7.3 Technology Refresh (TR). 

The availability of the respective TRs via group PTF is scheduled for October 27, 2017.

More information on the IBM i TRs can be found here.

More detailed information on the Db2 for i TRs can be found here.

Looking through the database enhancements, we find some very interesting items to consider...

Db2 Web Query extends the community of users to the true data analyst and/or data scientist. New powerful data discovery capabilities make it even easier to navigate through data in pursuit of  understanding and actionable information.  More information can be found here.

Db2 for i JSON support extends database capability via new publishing functions:

    JSON_ARRAY
    JSON_ARRAYAGG
    JSON_OBJECT
    JSON_OBJECTAGG

Joining XML, JSON is fast becoming the go to mechanism for storing and sharing unstructured data. Composing a JSON document from the structured, relational (row and column) data via the integrated JSON functions represents expanded "data centric" development capabilities in Db2 for i.

SQL DML LIMIT and OFFSET enhancements (Hi Jon Paris!) including the ability to use them in both DELETE and UPDATE statements.

IBM i Access Client Solutions enhancements to database support. ACS is fast becoming the main tool for the IBM i database engineer.  Make it part of your toolkit today!

Alerts when approaching database limits.  IBM i will produce alerts for a subset of System Limits tracking. Once per day, the operating systems will look for new occurrences where consumption of some limits exceeded 90% of the maximum allowable size. For these instances of extremely high consumption, messages will be sent to the QSYSOPR system operator message queue. Limit alerting is available for:

    Maximum number of all rows in a table (partition)
    Maximum index size
    Maximum encoded vector index size
    Maximum number of variable-length segments

Trust me, when one hits a database limit unexpectedly, the fun stops. Allowing IBM i to provide an alert to the database engineer is the first step in avoiding a painful issue.  By the way, all of the Db2 for i limits can be found in the SQL Reference, appendix A.

_____


If you need assistance with getting more value out of your data residing in IBM i, or determining how best to make use of these, or any Db2 features and functions, please reach out - we are here to help.

Note: if you are currently running IBM i 7.1, these new features and functions are not available to you.  Please upgrade your operating system as soon as possible to take advantage of all that Db2 for i can offer!


Monday, August 14, 2017

Are You Open to Open Source Databases?


During the last 5 years, the awareness, acceptance and embrace of open source database systems has exploded. Everyone, including IBM is firmly seated on the bandwagon. For the last 12 months, I have been illuminating the concepts of open source (non relational) database systems during the Db2 for i Technical Forums. We also continue to review the fundamentals of relational database, lest we forget.

So, as a Db2 for i user, are you open to open source database?

If not, should you be?

Obviously the answer is: it depends!

Before we get into exactly what it might depend on, I highly recommend you take a few minutes to go off and read an introduction to open source databases by my friend and colleague, Rick Murphy.

Rick's article, "All you really need to know about open source databases" can be found here.


Welcome back!


If you're like me, you found Rick's overview interesting and insightful. We can also use it as a starting point to answer the question posed above.

When considering the adoption of any component or solution, we must first understand our business requirements and the technical requirements. These requirements must be reconciled and prioritized. Then and only then can we effectively consider components and/or solutions that might meet our requirements, thus avoiding buyer's remorse.

Now the question has transformed into: do you have business and technical requirements that can be met by an open source database?

And more specifically, what flavor of open source database:

Relational?
Non relational?
Document?
Graph?
GPU accelerated?

A related and possibly more profound question is:

Can your current Db2 relational database management system, the one you already own, meet your requirements?  

hmm... if there is head scratching and shrugging of shoulders happening about now, it's time to learn more about what the current version of Db2 for i can do for you.


Revitalization vs. Modernization


More than a decade ago, we were introducing the idea of "modernizing" your database. Our goal was simply to get you to do more with Db2 by embracing true relational database constructs through proper modeling and design, move from application-centric programming to data-centric programming, make use of SQL as your language for interacting with Db2, migrate from record-at-a-time processing to set-at-a-time processing.

What was once called database modernization, we now refer to as database "revitalization". This term more accurately reflects what needs to be accomplished. Db2 for i is, and always has been, a "modern" relational database management system. That fact that you are not using it that way should in no way diminish the capability, nor tarnish the value, of the Db2 relational database management system you have in hand today.

Extending and expanding your database and data-centric programming capabilities is called database modernization.  Meaning, a modern database environment is comprised of many different data storage and data processing technologies that are fit for purpose and meet requirements. This can be referred to as a Polyglot Persistence Environment. This is a formal way of saying: store, process and access your data using the database system that best meets your needs, and using more than one is expected. In more practical terms, why try to store and process vast quantities of unstructured and unrelated data in a structured, relational database. It's better to use an unstructured, non relational database system instead.


What does your future look like?


It will definitely include the continued use of Db2 for relational data!

My prediction is that it will also include handling unstructured data using non relational, open source database system(s), on premise and in the clouds.  And that means, making use of an operating system other than IBM i. 





Let's be clear, if you are going to acquire, implement and make productive use of an open source database, you will use an open source operating system. The good news is, IBM Power systems run Linux, AND Power runs open source databases very well indeed.

Another important aspect... you are going to step up your database engineering. Embracing various and sundry forms of data storage, data processing and data access will require a lot more database science and art. If nothing else, you will need to sort out the database designs and architectures that will best meet your requirements, and guide the users toward those sources.


A Summary






And remember, modernization and revitalization is a process, not a product, and not a tool.

Modernization and revitalization involve not only applications and databases, but also:

  • Organization Structure and Alignment
  • Organization Leadership
  • Adopting and embracing new practices and new disciplines
  • Multi-dimensional communication

If you want to learn more about revitalizing and/or modernizing your database environment (including the people part of the equation), please let me know.  We are here to guide you, and assist with the journey!