Skip to content

Database

Everything our consultants learn while running databases for customers: Oracle, PostgreSQL, SQL Server, MySQL, MariaDB, MongoDB and Delphix. Expect hands-on posts about installation, day-to-day administration, backup and recovery, performance tuning, replication and upgrades.

Watching sql statements in PostgreSQL

Back in 2012 I wrote a small blog post about watching the results of commands in Linux. Well, the same can be done in psql: (postgres@[local]:4448) [postgres] > create table t1 ( a int ); CREATE TABLE (postgres@[local]:4448) [postgres] > insert into t1 values ( generate_series ( 1, 10)); INSERT 0 10 (postgres@[local]:4448) [postgres] > select count(*) from t1; count… 

OCM 12c preparation: RAT in multitenant

By Franck Pachot . I have several customers that have cases where Real Application Testing can be interesting, but they don’t use it because it’s an expensive option. Which is why it’s probably the topic listed for OCM 12c exam where I’ve the less experience. And I don’t even know at which level (CDB or PDB) it has to be… 

Setting your cluster name in PostgreSQL 9.5

PostgreSQL 9.5 introduces a new parameter which is called: cluster_name. So, what is this good for? Imagine you have two (or even more) PostgreSQL clusters running on the same host. When looking at the operating system processes this might look like this: postgres@oel7:/home/postgres/ [PG6] ps -ef | grep “postgres:” postgres 2325 2324 0 14:01 ? 00:00:00 postgres: logger process postgres… 

OCM 12c preparation: Data Guard with OEM

By Franck Pachot . I never create a Data Guard configuration from Enterprise Manager. It’s not that I don’t like GUI, but it is a lot easier to document it when doing from command line: copy paste the commands (actually I write the commands in the documentation and then copy to execute them so that I’m sure about the documentation).… 

OCM 12c preparation: documentation

By Franck Pachot . The OCM exam advice says: Be prepared to use the non-searchable documentation during the exam, to help you with correct syntax. I’ve checked that I can find quickly the documentation related with each topic listed. Here it is As in the previous posts, I write that before taking the exam, from only the list of topics,… 

OCM 12c preparation: Explain fast refresh

By Franck Pachot . There are some rules to be able to fast refresh a materialized view (which means, refresh it so that it is not stale, and without running the whole query). Documentation is in the Datawarehouse Guide, but we can use Enterprise Manager to get quickly to our goal. Let’s see which tables we have: and create materialized… 

OCM 12c preparation: Transportable Tablespaces

By Franck Pachot . I use transportable tablespaces a lot since 8i, here are just a few examples. Same disclaimer here as in the first post of the series: don’t expect to get those posts close to what you will have at the exam, but they cover important points that matches the exam topics. Documentation Information about the exam says:… 

SQL Server 2016: new T-SQL commands COMPRESS and DECOMPRESS

In live from the JSS2015 (Journée SQL Server 2015) in Paris, we saw that the CTP3.1 has been available in the night of these 2 days. One new feature available for this release in the T-SQL domain is COMPRESS and DECOMPRESS. Through a GZIP algorithm, you can compress and decompress an argument for nvarchar, varchar, varbinary, char and binary data… 

Parallel sequential scans are coming to PostgreSQL

It didn’t made it into the upcoming PostgreSQL 9.5 release but it will probably be coming in 9.6: Parallel sequential scans. If you take a look at the development documentation some new parameters showed up: max_parallel_degree: The maximum degree of parallelism for an individual parallel operation. parallel_tuple_cost: Sets the planner’s estimate of the cost of transferring a tuple from a… 

SQL Server Extended Event: Eine Deadlock-Event aus der “system_health” Überwachung

Wie Sie vielleicht wissen, gibt es eine Überwachung über Extended Events: system_health. Kürzlich fragt mich ein Kunde an, um ein zufälliges Deadlock-Problem zu analysieren… Ich hatte im September in Lausanne einen Vortrag zum Thema Performance-Monitoring und Extended Events präsentiert… Viele Leute kennen das nicht, dass in den system_health des SQL Servers die Informationen zu den Deadlock-Events abgelegt sind. Wo sind… 

Monitoring tools for PostgreSQL – POWA

The last posts introduced the logging system, pg_stat_statements, pg_activity and pgcluu. This post will look at POWA: PostgreSQL Workload Analyzer. For getting the most out of POWA the following extension should be installed in the PostgreSQL instance you want to monitor: pg_stat_statements (see last post) pg_stat_kcache: gathers statistics about reads and writes done by the file system layer pg_qualstats: gathers…