Nulls in composite keys
By Franck Pachot . Comparison of NULL can be misleading and it’s even worse for unique constraint validation. Having partial nulls in a composite key can be tricky because the SQL ANSI specification is...
View ArticleOracle serializable is not serializable
By Franck Pachot . Did you know that when you set isolation level to SERIALIZABLE, it is not serializable but SNAPSHOT? This isolation level is lower than serializable. I’ve never thought about it...
View ArticleOracle 12cR2 SQL new feature: LISTAGG overflow
By Franck Pachot . LISTAGG was a great feature introduced in 11g: put rows into line with a simple aggregate function. 12cR2 adds an overflow clause to it. What happens when you have so many rows that...
View ArticleHow to destroy your performance: PL/SQL vs SQL
Disclaimer: This is in no way a recommendation to avoid PL/SQL. This post just describes a case I faced at a customer with a specific implementation in PL/SQL the customer (and me) believed is the most...
View ArticleAPEX Connect 2017 – Day 1
This year again the APEX connect conference spans over three days with mixed topics around APEX, like JavaScript, CSS, SQL and much more. After the welcome speech and the Keynote about “Reconciling...
View Article“_suppress_identifiers_on_dupkey” – the SAP workaround for bad design
By Franck Pachot . In SQL, ‘upsert’ is a conditional insert or update: if the row is there, you update it, but if it is not there, you insert it. In Oracle, you should use a MERGE statement for that....
View ArticleDocumentum – DFC traces setup & investigation
When working with Documentum, you will most probably have to enable the DFC traces one day or another and then work with these traces to analyze them. The purpose of this blog is simply to show how the...
View ArticleSQL Server 2017: TRIM not only a replacement of RTRIM and LTRIM
Last month, I present in the IT-Tage 2017 in Frankfurt am Main, a session about SQL Server 2017 overview. During my session I made a demo on one of the new string T-SQL Commands: TRIM. My demo was very...
View ArticleA tribute to Natural Join
By Franck Pachot . I know that lot of people are against the ANSI join syntax in Oracle. And this goes beyond the limits when talking about NATURAL JOIN. But I like them and use them quite often. Why...
View ArticleSQL Tuning – Mix NULL / NOT NULL Values
One of the difficulty when writing a SQL query (static SQL) is to have in the same Where Clause different conditions handling Null Values and Not Null Values for a predica. Let’s me explain you by an...
View ArticleOracle 20c SQL Macros: a scalar example to join agility and performance
By Franck Pachot . Let’s say you have a PEOPLE table with FIRST_NAME and LAST_NAME and you want, in many places of your application, to display the full name. Usually my name will be displayed as...
View ArticleRefactoring procedural to SQL – an example with MySQL Sakila
By Franck Pachot What I want to show in this blog post is that, as in mathematics where you have to apply some algebra rules to transform an equation to an equivalent one, the database developer must...
View ArticleThe myth of NoSQL (vs. RDBMS) agility: adding attributes
By Franck Pachot . There are good reasons for NoSQL and semi-structured databases. And there are also many mistakes and myths. If people move from RDBMS to NoSQL because of wrong reasons, they will...
View ArticleNo{Join,GroupBy}SQL – Analytic Views for BI
By Franck Pachot . Advocates of NoSQL can query their structures without having to read a data model first. And without writing long table join clauses. They store and query a hierarchical structure...
View ArticleOracle non-linguistic varchar2 columns to order by without sorting
By Franck Pachot . Sorting data is an expensive operation and many queries declare an ORDER BY. To avoid the sort operation you can build an index as it maintains a sorted structure. This helps with...
View ArticleThe myth of NoSQL (vs. RDBMS) “joins dont scale”
By Franck Pachot . I’ll reference Alex DeBrie article “SQL, NoSQL, and Scale: How DynamoDB scales where relational databases don’t“, especially the paragraph about “Why relational databases don’t...
View ArticleThe myth of NoSQL (vs. RDBMS) “a simpler API to bound resources”
By Franck Pachot . NoSQL provides an API that is much simpler than SQL. And one advantage of it is that users cannot exceed a defined amount of resources in one call. You can read this in Alex DeBrie...
View ArticleA lesson from NoSQL (vs. RDBMS): listen to your users
By Franck Pachot . I have written a few blog posts about some NoSQL (vs. RDBMS) myths (“joins dont scale”, “agility: adding attributes” and “simpler API to bound resources”). And I’ll continue on other...
View ArticleRDBMS (vs. NoSQL) scales the algorithm before the hardware
By Franck Pachot . In The myth of NoSQL (vs. RDBMS) “joins dont scale” I explained that joins actually scale very well with an O(logN) on the input tables size, thanks to B*Tree index access, and can...
View ArticleSQL Server: Generating SQL script using PowerShell and Template file
In this blog post, I will share with you a small PowerShell script I did recently. I have noticed that my customer performs a very repetitive and time-consuming task almost every day. New columns are...
View Article