Infrastructure at your Service

All Posts By

Franck Pachot

Franck Pachot

Oracle recovery concepts

By | Oracle | No Comments

I’ve published a while ago a twitter thead on some Oracle recovery concepts. For those who are not following twitter, I’m putting the whole thread here:   🔴⏬ Here I start a thread about some Oracle Database concepts. We will see how far it goes - all questions/comments welcome. 🔴⏬ A database (or DBMS - database management system) stores (for short and long term) and manipulates (from many concurrent users/devices) your #data. 🔴⏬ #data is logically structured (tablespaces, schemas, tables, columns, datatypes,…

Read More
Franck Pachot

Oracle disables your multitenant option when you run on EC2

By | Cloud, Oracle | 3 Comments

I have installed Oracle 19.6 on an EC2 for our Multitenant Workshop training. And of course, during the workshop we create a lot of PDBs. If you don’t have paid for the Enterprise Edition plus the Multitenant Option you can create at most 3 pluggable database. But with this option you can create up to 252 pluggable databases. Does it worth the price, which according to the public price list is USD 47,500 + 17,500…

Read More
Franck Pachot

DynamoDB: adding a Local covering index to reduce the cost

By | Cloud, Database Administration & Monitoring | No Comments

By Franck Pachot . This is a continuation on the previous post on DynamoDB: adding a Global Covering Index to reduce the cost. I have a DynamoDB partitioned on “MyKeyPart”,”MyKeySort” and I have many queries that retrieve a small “MyIndo001” attribute. And less frequent ones needing the large “MyData001” attribute. I have created a Global Secondary Index (GSI) that covers the same key and this small attribute. Now, because the index is prefixed by the…

Read More
Franck Pachot

DynamoDB: adding a Global covering index to reduce the cost

By | Cloud, Database Administration & Monitoring | No Comments

By Franck Pachot . People often think of indexes as a way to optimize row filtering (“get item” faster and cheaper). But indexes are also about columns (“attribute projection”) like some kind of vertical partitioning. In relational (“SQL”) databases we often add more columns to the indexed key. This is called “covering” or “including” indexes, to avoid reading the whole row. The same is true in NoSQL. I’ll show in this post how, even when…

Read More
Franck Pachot

ysql_bench: the YugaByteDB version of pgbench

By | Postgres | No Comments

By Franck Pachot . This follows the previous post on testing YugaByteDB 2.1 performance with pgbench: https://blog.dbi-services.com/yugabytedb-2-1/ A distributed database needs to reduce inter-node synchronization latency and then replaces two-phase pessimistic locking by optimistic concurrency control in many places. This means more serialization errors where a transaction may have to be re-tried. But the PostgreSQL pgbench does not have this possibility and this makes benchmarking distributed database very hard. For example when CERN tested CoackroachDB…

Read More
Franck Pachot

YugaByteDB 2.1: the Open Source multi-region distributed database with PostgreSQL API is in GA with huge performance improvement

By | Postgres | No Comments

By Franck Pachot . 9 months ago I was looking at YugaByteDB which was still in beta version for its ‘YSQL’ API. I published my first test on Medium: https://medium.com/@FranckPachot/running-pgbench-on-yugabytedb-1-3-3a15450dfa42. I have been very enthusiastic about the idea, the architecture, the way they open-sourced it and how all was documented in their blog. I’ve even met them in Sunnyvale when I traveled to California for Oracle Open World. Great people with a great vision on…

Read More
Franck Pachot

Refactoring procedural to SQL – an example with MySQL Sakila

By | Development & Performance | 4 Comments

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 translate the business specification to an equivalent that is optimized (in performance, reliability and readability) for the data model. I was looking at the Sakila sample database provided with MySQL. It simulates a DVD rental store. For my…

Read More
Franck Pachot

Oracle 20c SQL Macros: a scalar example to join agility and performance

By | Cloud, DevOps, Oracle | One Comment

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 ‘Franck Pachot’ and I can simply add a virtual column to my table, or view, as: initcap(FIRST_NAME)||’ ‘||initcap(LAST_NAME). Those are simple SQL functions. No need for procedural code there, right? But, one day, the business will come with new…

Read More
Franck Pachot

How SQL Server MVCC compares to Oracle and PostgreSQL

By | Database Administration & Monitoring, Oracle, Postgres, SQL Server | No Comments

By Franck Pachot . Microsoft SQL Server has implemented MVCC in 2005, which has been proven to be the best approach for transaction isolation (the I in ACID) in OLTP. But are you sure that writers do not block readers with READ_COMMITTED_SNAPSHOT? I’ll show here that some reads are still blocked by locked rows, contrary to the precursors of MVCC like PostgreSQL and Oracle.

Read More