Adding a Column with a Default Value and a Constraint

The Constraint Optimization series:

In the previous parts of this series I showed that Oracle does a nice optimization – that may save plenty of time – when we add in a (more...)

postgres Statistiken: pg_stat_all_tables

Alexey Lesovsky hat bereits eine ganze Reihe interessanter Artikel im Rahmen einer Serie "Deep dive into postgres stats" veröffentlicht. Bisher hatte ich mich davor gedrückt, diese Ausführungen zusammenzufassen, aber heute ist ein ruhiger Tag und die pg_stat_all_tables scheint mir eine besonders interessante Quelle zu sein...

Die View pg_stat_all_tables enthält eine ganze Reihe interessanter Informationen zur Nutzung von Tabellen. Unter anderem weist sie hin auf:
  • Zugriffsinformationen: die View enthalt Informationen zur Anzahl sequentieller Scans (also Full (more...)

Meet me in St. Louie, Louie.

Join me on May 2nd in St. Louis for the SilverLinings event where I will give three talks!

COLLECT DISTINCT in PL/SQL Works in Oracle 12.2

About a year ago I wrote the post Subtleties – Part 1 (SQL and PL/SQL). I wrote there:

Almost every valid SQL statement (i.e., that is executed successfully by the SQL engine) can be embedded successfully as a static SQL in PL/SQL. Almost, but not every statement.
One example is the COLLECT aggregate function with the DISTINCT option.

And I showed an example that was executed in and in (more...)

postgres Extensions

Zwei interessante Hinweise findet man im neusten postgres-Artikel von Daniel Westermann:
  • das data dicitionary von postgres liefert zahlreiche Informationen zu den verfügbaren und den installierten Extensions:
  •  pg_available_extensions: zeigt die verfügbaren und die installierten Extensions inklusive eines Kommentars zu ihrer Funktion.
  • pg_available_extension_versions: liefert weitere Detailinformationen zu den Extensions, unter anderem zu den Abhängigkeiten, die zwischen den Erweiterungen bestehen.
  • pg_extension: liefert Informationen zu den installierten Extensions. Dabei weichen die Informationen von denen ab, die der psql-Shortcut (more...)

(Lack of) Optimization of Unique Constraint Creation

The Constraint Optimization series:

In the previous parts of this series I showed that Oracle does a nice optimization – that may save plenty of time – when we add in a single ALTER TABLE statement a new (nullable with no default value) column (more...)

ORDS Standalone and URI Rewrites

My last post How to add an NCSA style Access Log to ORDS Standalone explained what the ORDS standalone is and that is based on Eclipse Jetty.  Jetty offers far more than ORDS exposed in it's standalone.  There's a long list of all the features and configuration options listed in the documentation, A recent question came up for doing

Optimization of Foreign Key Constraint Creation

In a recent post I showed that Oracle does a nice optimization when we add a new (nullable with no default value) column with an inline (a.k.a. “column-level”) check constraint in a single ALTER TABLE statement. This optimization does not apply for out-of-line (“table-level”) check constraints.

So, what about foreign key constraints?

Clearly, when adding a new nullable with no default value column to a table which contains records, then, by definition, the (more...)

DB Auditing and ORDS

There seems to be some confusion around how ORDS works with it's connection pooling yet running the REST call as the specified schema. The connection pool Consider a 50 PDB env and concurrent users per PDB running some REST stuff.  Using a connection pool per PDB would be 50 connection pools.  Then if a JET app ( or any HTML5/JS/.. ) is making REST calls Chrome will do this with 6 concurrent

Optimization that Violates Data Integrity

In the previous post I showed that Oracle does a nice optimization when we add a new (nullable with no default value) column with an inline check constraint in a single ALTER TABLE statement.
However, there is one case where this optimization allows for data integrity violation instead of forbidding it (which makes it a bug, in this specific case, rather than an optimization). It happens when the check constraint is “column IS NOT NULL”.


Optimization of Check Constraint Creation

I have a table T with many records and I want to add a new column C to this table with some check constraint on C.

Does it matter if I use the following statement


or this one


Note that the only difference is the comma that appears in the first option and not (more...)

Data Vault Training – Europe & US

Lots of training classes on Data Vault 2.0 are on the horizon around the world thanks to a new venture that Dan Linstedt and Michael Olschimke have formed called ScaleFree. In addition to world class consulting, they are offering dozens of Data Vault 2.0 related classes, including Bootcamps, Certification, and Introduction to Data Vault Modeling. […]

Building a Data Lake in the Cloud 

So you want to build a Data Lake in the Cloud? Here is how.

Skript zur Bestimmung von Index Fragmentation

In den OTN Foren gibt es bei diversen Beiträgern eine gewisse Tendenz dazu, auf bestimmte Schlüsselwörter allergisch zu reagieren. Eines dieser Schlüsselwörter ist: Fragmentation. Im ungünstigen Fall bekommt man dann zur Antwort, dass es so etwas wie Fragmentation nicht gäbe - was ich für ausgemachten Blödsinn halte -, im günstigeren Fall, dass man den Terminus bitte erst mal definieren sollte, was durchaus eine sinnvolle Reaktion darstellt. Aber da der Fall von Index Fragmentation eher weniger (more...)

Change Repository DB Connection in EM 13c

Sometimes it’s hard to find what you’re looking for in the Oracle documentation or on MOS if you don’t already know what exactly to search for. This happened to me while trying to find out  how the method of changing the DB connection for the EM repository changed in 13c. So I thought my findings […]

Collaborate’17: Slides are available

For some reasons, slides from one of my presentations are not available via the conference agenda tool. No problem, here is a direct link:

More thoughts/comments about the conference are coming! To be continued...

Results of Oracle Dev Gym SQL Annual Championship for 2016

March 29th 2017 a group of 35 database developers competed in the Oracle Dev Gym SQL Annual Championship for the top ranked players of 2016. They worked their little grey cells hard for 45 minutes over 5 quizzes that I had tried to make extra hard for them.

The results have now been made public on the Oracle Dev Gym site, so I'd like here to add my congratulations to everyone who made it to (more...)

String to DATE conversion and validation in 12.2

A new little feature in Oracle Database 12.2 is, that you can convert strings to dates without worrying about exception handling. (That goes also for converting to numbers or timestamps or other datatypes, but here I'll concentrate on dates.)

It's just one of a ton of new 12.2 features ranging from minor features that make your daily life slightly easier to major inventive features. I've been part of a Trivadis Team that (more...)

Maven Plugin for simplified SOA Cloud Deployments from Developer Cloud Service

This blog will provide an understanding of how the Maven plugin enhancement in Oracle Developer Cloud Service could let you access the Oracle Maven repository, thus simplifying build and deployment of SOA composites on Oracle SOA Cloud Service.

Note: The scope of the blog does not cover how to develop a SOA composite.


Tech Stack Usage:

Oracle Developer Cloud Service

Oracle SOA Cloud Service with SOA version 12.1.3

Jdeveloper 12.1.3


Compiling views: when the FORCE fails you

Darth-Vader-selfieThe order in which your deployment scripts create views is important. This is a fact that I was reminded of when I had to fix a minor issue in the deployment of version #2 of my application recently.

Normally, you can just generate a create or replace force view script for all your views and just run it in each environment, then recompile your schema after they’re finished – and everything’s fine. However, if views depend (more...)