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.

What is more efficient: arrays or single column values?

In PostgreSQL ( as well as in other rdbms ) you can define columns as arrays. What I wondered is: What is more efficient when it comes to space: Creating several columns or just creating once column as array? The result, at least for me, is rather surprising. First, let’s create a table with columns of type int: postgres=# create… 

SQL Interpolation with psql

The PostgreSQL psql utility provides some really nice features. One of these features is SQL interpolation which allows us to do interesting things, e.g. reading files and analyze the results directly in the database. This post will show how to use this by reading and analyzing sar files of a linux server. Usually linux hosts store sar statistics in the… 

A free PostgreSQL cloud database?

Recently I was looking for a free PostgreSQL cloud database service for testing. Why? Because I’d like to use such a cloud instance for testing no matter on which workstation or OS I am currently on. Another reason is, that I could could prepare some demos at home and use the same demos at work without needing to worry about… 

PostgreSQL portable?

What a surprise: Headed over to the sourceforge page, downloaded, installed (which is just a matter of next/next/next) : Not really the latest patchset but far more than I expected 🙂 So I can do tests on a Windows machine where I do not have any permissions to install software. Great. If you prefer a graphical client then go ahead… 

SQL Server 2016: native support for JSON

A lot of discussions and most important, a feature requests in the Microsoft connect site here with more than 1000 votes is the origin of this new feature in SQL Server 2016. A lot of NoSQL have already this function and PostgreSQL for example have the json_extract_path_text functionality and you can at every time ask my colleague Daniel Westermann one of… 

using dbms_server_alert in combination with a custom monitoring solution

Lot’s of companies do not use Grid- or Cloud Control for monitoring their Oracle databases for various reasons but rather use open source tools like nagios. And lot of those either implemented custom script frameworks or rely on plug-ins available for the monitoring solution of choice. This post shall show on how you can let Oracle check a lot of… 

draft release notes for PostgreSQL 9.5 online

Bruce Momjian, one of the PostgreSQL Core members, just compiled the first draft version of the release notes for the upcoming PostgreSQL 9.5 Some of the goodies that will show up: BRIN indexes (comparable to exadata storage indexes) Upsert (known as merge statement in the oracle world) wal_compression grouping sets … any many, many more… If you want to test… 

quickly exchange code or text between workstations or teams

In a recent project I faced the following situation: One the one hand I had to execute scripts on a customer’s workstation while on the other hand I had to integrate the results of these scripts into a report on my own workstation. The question was how to efficiently do this without sending dozens of mails to myself. One solution… 

Show the Top 10 events from latest AWR snapshot

By Franck Pachot . Want to display a specific section from the latest AWR report? I’ll share the script I use to get something like that: SQL> @ LASTAWRSEC.sql ‘Top 10 Foreground Events by Total Wait Time’ ” AWR_REPORT_TEXT ——————————————————————————– Top 10 Foreground Events by Total Wait Time ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ Total Wait Wait % DB Wait Event Waits Time (sec) Avg(ms)… 

Parallel DML in 12c

By Franck Pachot . Following a question from Randolf Geist (who can imagine that there is something about parallel query that Randolf didn’t know?), I get back to some notes I’ve taken when 12c was out and I’ve tested them again on 12.1.0.2 – it’s about the ability to enable parallel DML at query level. Test case In 12.1.0.2 I… 

SQL Server 2016 CTP2: Stretch database feature – Part 1

SQL Server 2016 CTP 2 has introduced some interesting new features such as Always Encrypted, Stretch database, the configuration of the tempdb in the SQL Server installation, aso… Regarding the configuration of the tempdb in SQL Server 2016 CTP 2, I recommend you a good article called SQL Server 2016 CTP2 : first thoughts about tempdb database from David Barbarin.…