Rob van Wijk

Subscribe to Rob van Wijk feed
Simplicity is the ultimate form of elegance and sophisticationRob van Wijk
Updated: 7 hours 32 min ago

Filter predicates with NVL on mandatory columns using the index

Mon, 2018-02-19 15:43
Last Friday at work, I overheard a conversation between two DBA's about a performance problem of a job which usually ran in 10 minutes, now taking more than 4 hours. I helped them pinpoint the problem: a simple SQL query which took >95% of the time. Clearly this query was the culprit. The query selects from just one table but with 10 filter predicates of this form: nvl(column,'@') = nvl(:Rob van Wijk

Performance aspects of APEX reports

Wed, 2016-11-23 13:30
As this post appears, I'm presenting on this subject for the Dutch Oracle User Group OGh. This blog post won't contain as much detail as the presentation itself, although it's pretty close. If you're interested to see and replay everything for yourself, you can find the material of the presentation in the "Presentations and papers" section and here directly. There are installation instructions inRob van Wijk

Painting the Mona Lisa with SQL

Wed, 2015-04-29 18:18
Seven years after the first Obfuscated SQL Code Contest, a new one has been organised on the PL/SQL Challenge website. I had fun writing my first entry back then, but in the back of my mind I regretted not doing something with ASCII art. So the new contest was a good pretext for me to finally fill in that gap. Here is my entry for the second Obfuscated SQL Contest: SQL> select listagg 2 (chrRob van Wijk

9th Planboard DBA Symposium

Tue, 2014-06-17 17:23
A couple of months ago, Nienke Gijsen invited me to speak about materialized views at the upcoming Planboard DBA Symposium. Because I had the pleasure of presenting before, I knew the conference is always well organized and a pleasure to visit. So of course I accepted the invitation. We agreed I'd talk on "just" incremental refreshes of materialized views using materialized view logs and about myRob van Wijk

APEX World 2014

Mon, 2014-03-31 04:23
The fifth edition of OGh APEX World took place last Tuesday at Hotel Figi, Zeist in the Netherlands. Again it was a beautiful day full of great APEX sessions. Every year I think we've reached the maximum number of people interested in APEX and we'll never attract more participants. But, after welcoming 300 attendees last year, 347 people showed up this year. Michel van Zoest and Denes Kubicek Rob van Wijk


Sun, 2014-01-05 17:32
I answered a few SQL questions on Stack Overflow recently, which I could solve easily by using the Tabibitosan method. It's such an elegant and efficient technique, I think it's worth giving it an extra bit of attention through this post. I'm certainly not the first to write about it: it was introduced to me by Japanese Oracle ACE Aketi Jyuuzou on OTN. He wrote a special forum post explaining hisRob van Wijk


Thu, 2013-11-28 16:06
During a performance inspection of some E-Business Suite batch programs running on, I noticed almost 99% of the consistent reads missing in the tkprof file for a particular insert statement. It was a giant INSERT ALL statement where the accompanying select statement contained several subqueries in a "case when exists (query)" construct. And those subqueries in the select clause was what Rob van Wijk

Distributing tables evenly into groups using the SQL Model Clause

Sun, 2013-10-06 16:59
My colleague Ronald Rood recently had a nice SQL challenge for me. He had to perform an export of all the tables in a schema the old fashioned way and wanted to manually parallellize the operation. For that to work, all tables need to be assigned to a group. For the parallellization to work, the groups need to be balanced. If, say, all large tables are in one group, the parallellization won't Rob van Wijk

OGh APEX World 2013

Tue, 2013-04-16 17:35
Last Tuesday, the fourth OGh APEX World day took place, again at Figi Zeist. Several people have already written about this day: Christian Rokitta, about the announcements from David Peake in his keynote, Bart Peeters from iAdvise, with comments about several sessions and Rob de Gouw from Quobell, written in Dutch. Here is a short writeup about my experiences that day. For me, this year was a Rob van Wijk

Paper "Professional Software Development using APEX"

Wed, 2013-03-20 12:58
As announced on Twitter yesterday, my paper titled "Professional Software Development Using Oracle Application Express" has been put online. I'm copying the first two paragraphs of the summary here, so you can decide if you want to read the rest as well: Software development involves much more than just producing lines of code. It is also about version control, deployment to other environments, Rob van Wijk

Dummy output parameters

Tue, 2013-01-29 12:31
Yesterday I encountered a code snippet which taught me something I did not think was possible. But it is, as I'll show in this blogpost. It's not spectacular in any way, just convenient at most. When you need a function or procedure to retrieve some value, you'll start examining the existing code base if a function already exists that does the job. Probably you won't find an exact match, but Rob van Wijk

UKOUG 2012

Sat, 2012-12-22 06:39
My third time visiting the annual UKOUG conference in Birmingham started all wrong. At Schiphol Airport, the usual luggage check routine took place: laptop out of the suitcase, wallet/keys/belt apart, toothpaste apart. And afterwards putting everything back in. But I forgot to close the wheeled suitcase and when putting it on the ground, my MacBook Pro fell out. A quick inspection revealed that Rob van Wijk

Ciber knowledge session November 28

Sun, 2012-11-11 17:27
On Wednesday evening November 28, my colleague Marcel Hoefs and I will both do a one-hour knowledge session at Ciber Nieuwegein. What's new about it, is that the knowledge session is not only for Ciber colleagues, but for anybody who would like to attend. Both sessions will be in Dutch, so for the remainder of this post, I'll switch to Dutch and copy Marcel's invitation text: Graag nodig ik Rob van Wijk

Keep clause

Sat, 2012-09-15 12:26
You may have seen an aggregate function like this in SQL queries: max(value) keep (dense_rank first order by mydate) or this analytic variant: max(value) keep (dense_rank last order by mydate) over (partition by relation_nr) Unfortunately, when you start searching for the "keep" clause, you won't find anything in the Oracle documentation (and hopefully because of this blogpost, people will Rob van Wijk

Much Ado About Nothing?

Sat, 2012-05-19 04:58
I was reading this presentation PDF of Hugh Darwen recently, called How To Handle Missing Information Without Using NULL. Several great thinkers and founders of the relational theory consider NULL as the thing that should not be. For example, one slide in the above mentioned PDF is titled SQL's Nulls Are A Disaster. And I found a paper with the amusing title The Final Null In The Coffin. I can Rob van Wijk

Mastering Oracle Trace Data with Cary Millsap

Wed, 2012-03-28 15:42
At CIBER we are very proud to announce that Cary Millsap will give his one day seminar called Mastering Oracle Trace Data in the Netherlands. The event will take place at the Carlton President Hotel at Utrecht on Wednesday, May 23. You can register and read more about this event here.The seminar is aimed at DBA's, database application developers, data warehouse specialists and anyone caring aboutRob van Wijk

Third OGh APEX dag

Tue, 2012-03-27 14:38
Yesterday was the third annual APEX day, organized by the Dutch Oracle usergroup OGh. It's the biggest APEX only event in the world, I've been told, with approximately 280 attendees. Learco Brizzi, Marti Koppelmans and myself were very proud to again have a great lineup of presenters and presentations.The day started with a keynote by Patrick Wolf telling about and showing a lot of new 4.2 Rob van Wijk

Connect By Filtering

Sun, 2012-03-25 16:50
A hierarchical query is typically executed using a plan that starts with the operation CONNECT BY WITH FILTERING, which has two child operations. The first child operation implements the START WITH clause and the second child operation contains a step called CONNECT BY PUMP, implementing the recursive part of the query. Here is an example of such a plan using the well known hierarchical query on Rob van Wijk


Sun, 2011-09-25 05:03
Most of us know the SQL keyword EXISTS as the condition with a subquery you use in a WHERE clause. But if you look at the documentation of EXISTS, you'll see that it says nothing about just using it in a WHERE clause. It's just a sort of function that accepts a query as input and returns "TRUE if a subquery returns at least one row". The SQL language doesn't know about booleans, but it calls Rob van Wijk

Partitioned outer join bug

Tue, 2011-07-12 15:00
I have experienced a strange bug when constructing an example showing how a partitioned outer join works. I used a setup which resembles a situation I have consulted about recently for timeseries data. The table can hold multiple timeseries whose data is coming from multiple sources. The data itself contains volumes that are reported for every 5 minutes. This table looks like this:SQL> create Rob van Wijk