Databases at CERN blog

Oracle LIKE predicate and cardinality estimations

There are not many ways to access efficiently to table rows. Either you want lot of them, because your predicate is not very selective, and you read the whole table in the fastest you can do. This is Table Full Scan. Or you use a structure that gives you access to the subset of rows you need. There are mostly two structures for that: sort and hash.

An .rpm to install Oracle Database 18c

It was announced at Oracle Open World 2017 and here it is just before the start of OOW18: an RPM to install the Oracle Database software.

Download

In the Oracle Database 18c download page there are two files for 18.3. One is a zip of the Oracle Home that we have to unzip and run the setup (named runInstaller but different than the one we had in pre-18c releases). The other file is an RPM: oracle-database-ee-18c-1.0-1.x86_64.rpm

ODC Appreciation Day : Reduce CPU usage by running the business logic in the Oracle Database

Here is my #ThanksODC post. A long one... There's a point that should always be a major topic for database developer community discussions: where to run the procedural code. The access to data is in the database, for sure, and the language for it is SQL. But very often, the business logic of a transaction cannot be executed in one single SQL statement. Either because it is too complex and requires a procedural language.

Configuring Technologies to Work with Java Mission Control

Introduction

Java Mission Control was introduced with JDK 7u40. With JDK 8u40 and later, you can get JMC to monitor any Java workload out of the box. However, in order to customise how JMC and JFR will act we need to configure the Java Virtual Machines and technologies running them ourselves.

This post will explain how to enable JFR, log-in details for remote monitoring, configure ports and pass any arguments you want to the JVM when using Tomcat and Docker with JMC. In this blog, our test environments will only be Tomcat and Docker.

Unindexed Foreign Keys in Oracle and PostgreSQL

In Oracle we need to have a index on the foreign key column as soon as we have the intention to delete from the parent row, or a locking situation may block all transactions around the child table. PostgreSQL has a similar way to manage isolation, with MVCC, then do you think you also need to index the foreign keys? Here is a test that confirms that postgres does need to not lock the tables even without index on the foreign key. 

Efficiently query DBA_EXTENTS for FILE_ID / BLOCK_ID

Did you ever try to query DBA_EXTENTS on a very large database with LMT tablespaces? I had to, in the past, in order to find which segment a corrupt block belonged to. The information about extent allocation is stored in the datafiles headers, visible though X$KTFBUE, and queries on it can be very expensive. In addition to that, the optimizer tends to start with the segments and get to this X$KTFBUE for each of them. At this time, I had quickly created a view on the internal dictionary tables, forcing to start by X$KTFBUE with materialized CTE, to replace DBA_EXTENTS.

Oracle Cloud: upload large files through the Object Store REST API

In the previous post I used a simple oci-curl() function as a Command Line Interface to the Oracle Cloud Infrastructure without installing any client tool or language. It was easy for simple things such as starting and stopping services. But it can also be more powerful because it is simply a wrapper to call the OCI REST API, simplifying the sign-in and authentication, but allowing to run any GET, POST, PUT and DELETE method.

Pages

Subscribe to Databases at CERN blog