One of the newer features in DB2 is extended trimming capability in the functions LTRIM and RTRIM. Since Fixpack 2 of DB2 10.1 both functions have an optional second parameter which is used to specify the characters to be removed from the beginning or end of a string. Before it was only possible to remove blanks. If the second parameter is omitted, blanks are removed by default.
To trim your calories you could do the following:
db2 => values rtrim('All I eat: marzipan, vegetables, fruits',' ,abefgilrstuv')
1
---------------------------------------
All I eat: marzipan
1 record(s) selected.
The enhanced LTRIM and RTRIM functions can be used together with other functions of course:
db2 => values replace(ltrim('jogging and eating are great',' adgijno'),'are','is')
1
----------------------------
eating is great
1 record(s) selected.
The examples are just some food for thought about what is possible.
Henrik's thoughts on life in IT, data and information management, cloud computing, cognitive computing, covering IBM Db2, IBM Cloud, Watson, Amazon Web Services, Microsoft Azure and more.
Tuesday, April 29, 2014
Friday, April 11, 2014
DB2 Quiz: Find the website for this screenshot
Today's DB2 quiz is not that technical, but it requires that you are up-to-date on IBM's offerings for DB2. What is the context for this screenshot? On which website did I take it?
Probably easy to solve for you guys. Enjoy the weekend.
Probably easy to solve for you guys. Enjoy the weekend.
Monday, April 7, 2014
50 Years of IBM Mainframe: The Art of Selling
IBM (and the world) are celebrating 50 years of mainframe, "Make the Extraordinary possible". To honor the mainframe, I want to point you to a series of IBM-produced videos from few years back. The series is labelled "THE MAINFRAME: The Art of the Sale", featuring real IBMers and lots of wisdom...
Lesson One:
Lesson Two:
Lesson Three:
Lesson Four:
Lesson Five:
Lesson Six:
Lesson One:
Lesson Two:
Lesson Three:
Lesson Four:
Lesson Five:
Lesson Six:
Thursday, April 3, 2014
(SOLVED) DB2 Quiz: What function do I call?
Today, it is time for another DB2 quiz. I am going to present you the output of a DB2 function:
1
---
YES
1 record(s) selected.
Which built-in function did return this result? I invoked the function this way "values funcname", no parameters were involved. The function was added to DB2 in version 10.1.
Added on April 3rd:
As you can see from the comments, the quiz has been solved. I called the administrative function ADMIN_GET_INTRA_PARALLEL(). The function returns either YES or NO depending on whether the database application will run with intraparallel parallelism enabled or not. In DB2 10.1 several enhancements were made to exploiting parallelism. In addition to the database manager (dbm) switch INTRA_PARALLEL to enable or disable parallelism, it is also possible to call the new procedure ADMIN_SET_INTRA_PARALLEL() to configure parallelism for a specific connection.
1
---
YES
1 record(s) selected.
Which built-in function did return this result? I invoked the function this way "values funcname", no parameters were involved. The function was added to DB2 in version 10.1.
Added on April 3rd:
As you can see from the comments, the quiz has been solved. I called the administrative function ADMIN_GET_INTRA_PARALLEL(). The function returns either YES or NO depending on whether the database application will run with intraparallel parallelism enabled or not. In DB2 10.1 several enhancements were made to exploiting parallelism. In addition to the database manager (dbm) switch INTRA_PARALLEL to enable or disable parallelism, it is also possible to call the new procedure ADMIN_SET_INTRA_PARALLEL() to configure parallelism for a specific connection.
Labels:
administration,
DB2,
fun,
Information Center,
IT,
performance,
quiz,
sql,
version 10
Tuesday, April 1, 2014
DB2: First enterprise-ready wearable database system
This Tuesday IBM is going to formally announce a new version of DB2, the first enterprise-ready wearable
database system (wDBMS, "DB2 Wearable" or "DB2W"). With mobile and wearable technology on the
rise and wearable computers getting more powerful, IBM is creating the enterprise market
for wearable database systems. The first version, which will be
called DB2 Wearable Workgroup Edition (WWE), is aimed at departmental
deployment. A DB2 Wearable Enterprise Edition and advanced editions
of both products are planned for 2015. An open beta is planned to start thissecond quarter of 2014.
Wearable Computers, Wikipedia |
The DB2 Wearable Workgroup Edition
enables small to mid-sized groups or departments to efficiently
manage their data on the go, embedded in fashionable housing. It is a
new form of fabric with mesh networking and storage. As
enterprise-ready dbms, a focus is on high-availability and
performance. All wearers of DB2 can be active, allowing a high degree
of productivity. If someone has to step out for a break, even ower
longer periods, other members of the availability group can take over
the workload. Proven algorithms taken from advanced DB2 pureScale
features have been employed.
Inter-node communication and transfer
rates have been a concern with early prototypes. Hence IBM Research
developed new prefetching and communication protocols. The so-called
“transparent early access method” (TEAM) has been an astonishing
breakthrough. With this TEAM communication in place an increase in
transfer rates by 20x and access rates by 80 percent has been
observed. To improve transfer rates with DB2 group members in short
range, data can be transmitted by simple handshake via RDMA 2.1.3
(really direct manual attention). Based on experience from first
customer tests, it is advised to wash hands regularly to reduce
transmission-related failures.
It is planned to improve energy consumption of DB2 Wearable over the next months (read: fixpack 1). Research is ongoing regarding
nutrition of DB2 group members. Generally, users of DB2 Wearable are advised
to focus on a healthy diet. Depending on the type of breakfast,
different endurance rates have been observed. Studies in a lab
environment show performance boosts after certain CAC (candy and
coffee) feeds. A best practices paper is in the final stages and will
provide details on right CAC mixes depending on group size, type of
workload, and office conditions.
Be sure to sign up for the DB2 Technology Preview once it becomes available this week. Your feedback on this new and exciting technology is important. I will keep you posted on new details when they emerge. Let me know if you have questions.
Labels:
best practices,
beta,
cloud,
DB2,
energy saving,
IT,
smartphone,
technology sandbox,
wearable
Subscribe to:
Posts (Atom)