Data Warehousing & BI
Oracle RDBMS 11gR2 – new style hierarchical querying using Recursive Subquery Factoring
Sep 29th
Oracle Database 11g Release 2 introduces the successor to the good old Connect By based hierarchical querying, called Recursive Subquery Factoring. The basics are described in a previous article: http://technology.amis.nl/blog/6104/oracle-rdbms-11gr2-goodbye-connect-by-or-the-end-of-hierarchical-querying-as-we-know-it. This article will show some additional examples of using this recursive subquery factoring syntax.
The essence of this recursiveness: the subquery consists of two queries unioned together. The first query returns the root-nodes, the starting points in the tree or network. The second query is used to continually retrieve the next step or level: it refers to the subquery itself and finds the next node level based on the levels (root and zero or more previously retrieved levels) already retrieved by the subquery.
In code:
Oracle Database 11gR2 – New analytical function NTH_VALUE
Sep 15th
You are probably familiar with the FIRST_VALUE and LAST_VALUE analytical functions that were introduced some time ago into the Oracle RDBMS, in the 9iR2 release I believe (or at least that is when they made their way into the Standard Edition). These values are used to find the first respectively last value in a window in a partition that has been ordered in a certain way.
Oracle introduces a new, related function in 11gR2, called NTH_VALUE. Instead of simply the first or last value in an analytical window, we can ask for a specific row number, such as 2nd row (ND_VALUE?), the 7th or the 223th. This article shows the syntax for this new function.
The “X” Product – An X(ML) Database Opportunity?
Oct 1st
"Exadata – Extreme Performance Warehousing", that’s how the presentation on the last Friday morning from Oracle Open World started (Orig. Presentation Title was "Oracle’s New Database Accelerator: Query Processing Revolutionized") while speaking about the new database machine. And indeed it was a revolution and it took the blogosphere by night. My notes from this session are already "for historic use" because a lot of people already blogged about it.
Another nice side effect is that Kevin Closson started blogging again. If you want to know all about there is to know regarding the "Exadata" hardware then you now can read up on Kevin’s: "Exadata Posts" page and FAQ’s. It must have been hard for Kevin not to blog about this cool piece of machinery and its smart database software.
So if you want you can skip the following, because it is old news

Oracle Data Mining meets performance method “GAPP”
Sep 29th
Sunday 21 September 2008 at Oracle Open World, I had the opportunity to present my method "GAPP" once more (HOTSOS 2008 and Planboard may 2008). This time I also mentioned how the method can be used with Service Oriented Architectures (SOA). For people not knowing what "GAPP" is all about I give a small introduction to the method. I also like to tell you why I started with “GAPP” in the first place and what the added value is of the method above other methods.
"GAPP" means General Approach Performance Profiling and can be used to find out where in your architecture the most wait time variance can be explained from your business process. "GAPP" makes it possible with very little data, in higly complex technical infrastructures, still be able to find the performance bottlenecks for a specific business process. The nice thing about the method is that it is not only able to pinpoint a bottleneck which is already there, it is also able to pinpoint a future bottleneck in a normal running system. This is something what only "GAPP" can do.
What makes “GAPP” special:
- The method can analyse the full infrastructure, so from front-end to back-end
- The method is not focussing on one piece of the infrastructure, like only the database
- The method is able to predict how the response time of a business process will react on changes in involved factors
- The method is able to predict when a certain bottleneck will evolve to a real problem
Extreme performance introduced by patchset 11.1.0.7 smart scan
Sep 25th
Larry yesterday did his keynote here at Oracle Open World introducing the "Oracle(R) Exadata Storage Server". This morning I attended a session about the technical details behind the server. In principal the server works with 8 nodes running RAC on Oracle Enterprise Linux 5. For the storage management ASM is used and since 11.1.0.7 smart scan has been introduced. Smart scan has been designed for very big data sources used in queries, like in Data Warehouses, where tables from tera bytes are common. In principle the following is accomplished using smart scan:
Read the rest of this entry »
OOW 2007: (most) presentations available for download
Nov 21st
Most of the presentations for the sessions presented at Oracle Open World 2007, last week in San Francisco, can be downloaded from the Content Catalog at: http://www28.cplan.com/cc176/catalog.jsp. You will need to use the username/password combination cboracle/oraclec6 to download presentations. At http://www.oracle.com/openworld/2007/keynotes.html are all the keynotes, of which the one by Ed Abbo is probably the most interesting one.
OOW 2007: Mark Townsend explains “Storage is not cheap”
Nov 12th
My first formal activity at Oracle Open World 2007 was the Oracle Ace Director Product Briefing. A closed session where 30 odd ACE Directors (and you read that any way you like) had assembled to get some glimpses of what Oracle’s future has in store as well as some in depth insights into key products in the Fusion Middleware area as well as the database. The session was concluded by Mark Townsend (Oracle’s senior director of database product management), who delivered what will probably one of the best presentations during the week.
Mark ran us through some of the key features in RDBMS 11gR1 and in some areas laid down the road ahead to 11gR2. Not all of what I heard was new – we have been Beta testing 11gR1 since October 2006, so we have seen quite a bit of it – but some of the things became much clearer or useful than they had seem before.
One of the topics that caught my attention – which frankly it normally never does – was Storage.
Read the rest of this entry »
Oracle 11g Total Recall – Flashback in the hands of Database Designers and Application Developers, at last. And: the end of Journalling Tables
Oct 7th
One of the new features in the Oracle 11g database is called Oracle Total Recall. This is called marketing! I have read some weblogs where people – mostly DBAs – are surprised at all this attention for Oracle Total Recall, as it seems little more than the Flashback technology that since Oracle 9i has come to the foreground in Oracle 10g with Flashback Query, Flashback Table (even to before undrop) and Flashback Database. How much more does Oracle 11g give us in this area?
Well, in my opinion: in Oracle 11g, for the first time, Flashback has become a tool for Database Designers and Application Developers. And that is pretty important news.

Flashback- in a nutshell – is the ability
Read the rest of this entry »
Flexible Row Generator with Oracle 11g Unpivot Operator
Oct 5th
Row generation is a very useful technique for many (semi-)advanced SQL Queries. We have discussed various methods for row-generation in previous articles on our weblog. Examples are the CUBE operator, Table Functions and the Connect By Level < #number of records approach, apart from good old UNION ALL with multiple select from dual. These approaches vary in flexibility and compactness. CUBE and Connect By allow for easy generation of a large number of rows with little or complex control over the values in those rows, while the UNION ALL is elaborate and bulky, even though it gives great control over the exact values.
The Oracle 11g Unpivot operator presents us with a new way of generating rows with great control over the values in those rows and a more compact and elegant syntax than the UNION ALL alternative.
Let’s look at a simple example.
Read the rest of this entry »
The Oracle 11g UNPIVOT operator – turning columns into rows
Sep 30th
The PIVOT operation is one frequently discussed when talking about more advanced SQL Queries. Pivoting is the process of switching rows and columns, and is for example an advanced feature in Excel. Before Oracle 11g, there were several approaches to pivoting, that were not work-arounds for the lack of the PIVOT operator in the Oracle SQL Language.
With Oracle 11g, this has changed. Now we do have a PIVOT and an UNPIVOT operator at our disposal. Let's first take a look at UNPIVOT. In Oracle, the UNPIVOT operation is the process of turning Columns to Rows. Put simply, by applying the UNPIVOT operator to a number of columns, every row is split into that same number of rows. Each of these rows has two new columns: one for the column that this row stems from – one of the columns the data set was UNPIVOTed by – and one with the value from the column. The original UNPIVOT-columns are no longer part of the newly created records.
Let's take a look at a simple example, using the well known EMP table. We decide to consider the SAL and COMM columns as two different types of INCOME_COMPONENT. We would like to present our employees with an INCOME_COMPONENT column – and two rows for each employee with two income components.
This UNPIVOT query would look like this:
select *
from ( select ename, job, sal, comm
from emp
)
unpivot
( income_component_value
for income_component_type in (sal, comm)
)
/

