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.

How to import SQL Plan Directives

By Franck Pachot . Today I’ve presented SQL Plan Directives at the SOUG Romandie event. I had a question about the import/export of directives by Data Pump. The idea is that a lot of testing has been done on QA in order to validate the upgrade to 12c. A few directives had bad consequences (see Ludovico Caldara blog post for… 

DBA_SQL_PLAN_DIRECTIVE.LAST_USED

By Franck Pachot . If you have read Matching SQL Plan Directives and queries using it then you know how to use the ‘+metrics’ format of dbms_xplan. 21:49:54 SQL> explain plan for select distinct * from DEMO_TABLE where a=0 and b=0 and c=0 and d=0; Explained. 21:50:01 SQL> select * from table(dbms_xplan.display(format=>’basic +rows +note +metrics’)); PLAN_TABLE_OUTPUT ———————————————————————————- Plan hash value:… 

What that in-memory term is about, and what not

Everybody is talking about in-memory databases these days. And everybody is talking about columnar store for sets of data because this can be a benefit for analytic queries. And a lot of people start mixing these terms not realizing that these topics are not exchangeable. Traditionally in-memory means: Not persistent, but fast. And this is what pure in-memory databases are:… 

Row Store vs Column Store in SAP HANA

The SAP HANA database allows you to create your tables in Row or Column Store mode. In this blog, I will demonstrate that each method has its advantages and disadvantages and should be used for specific cases. Thanks to two kind of tests, I will show you that the Row Store mode should be used for simple SELECT SQL queries,… 

List all RMAN backups that are needed to recover

By Franck Pachot . This blog post is something I had in draft and Laurent Schneider blog post reminds me to publish it. With the right RMAN configuration you should not have to managed backup files yourself. The RMAN catalog knows them and RMAN should be able to access them. If you want to keep a backup for a long… 

SQL Server 2014: First Service pack (SP1) is available

May 14th, Microsoft has released the first Service Pack (SP1) for SQL Server 2014. It is more than thirteen months after the RTM version. SQL Server 2014 Service Pack 1 includes all of the CU from 1 to 5. Which issues are fixed in this SP1 There are 29 hotfixes: 19 for the Engine 6 for SSRS 3 for SSAS… 

Variations on 1M rows insert (3): using SQL Server In-Memory features

Let’s continue with this series about inserting 1M rows and let’s perform the same test with a new variation by using SQL Server In-Memory features. For this blog post, I will still use a minimal configuration that consists of only 1 virtual hyper-V machine with 1 processor, 512MB of memory. In addition my storage includes VHDx disks placed on 2… 

Optimized Row Columnar (ORC) format in PostgreSQL

Nowadays everybody is talking about columnar storage format. What can PostgreSQL do in this area? There is no native support for that in PostgreSQL but thanks to the fact that PostgreSQL is highly extensible there is a foreign data wrapper called cstore_fdw. Lets take a look on what it can do. For installing cstore_fdw we’ll need to install the protobuf-c-devel package… 

tmux – an alternative to screen

You may already use screen for multiplexing a terminal. This is especially useful when you want to start long running processes on a server and do not want to loose the connection because of a ssh connection timeout, firewall settings or other reasons. With screen the session keeps running even if you got disconnected somehow and you may re-attach to… 

does impdb into a compressed table really compress data?

Today at a customer we discussed the following scenario: To refresh a test database a datapump export and import was implemented. To save space on the test system the idea came up to compress the data on the test system. When we checked the documentation we came across the following statement: “When you use basic table compression, warehouse compression, or… 

Using VSS snapshots with SQL Server – part I

  This is probably a series of blog posts about some thoughts concerning VSS snapshots with database servers. Let’s begin with this first story: Some time ago, I implemented a backup strategy at one of my customers based on FULL / DIFF and log backups. No issues during a long time but one day a call of my customer who… 

Get the main information from SQL Server databases with PowerShell

As I promised in my previous blog Get the main Administration Information from SQL Server with PowerShell, I will present you this time how to retrieve the SQL Server databases information with PowerShell. Disclaimer: I am not a developer but a SQL Server dba. If you find errors or some ways of improvement, I will be glad to read your…