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.

Get SQL Server Network Configuration with PowerShell

This blog is part of a set which try to automate the SQL Server administration with PowerShell. It explains how to retrieve the network configuration of a SQL Server instance with PowerShell. I will refer to my previous blog Get SQL Server services with PowerShell. I presented how to get the SQL Server Engine service. I will assume the service… 

What will be coming with the next major version of postgresql ?

A PostgreSQL major version is usually released once a year. For the next major version, which is 9.5, this probably will be in the second half of 2015. As PostgreSQL is an open source product everything that goes on is available to the public. If you want to know what will be coming in the next release there are several… 

Variations on 1M insert (6): CPU Flame Graph

By Franck Pachot . If you followed the 1M rows insert variations, you have seen how something simple brought me into an investigation with the latest tools available to see where the time is spent. When the time is CPU time, there is no wait event to get the detail of DB Time. I’ve used perf events in the previous post… 

Variations on 1M rows insert (5): using ‘perf’

By Franck Pachot . In previous post I explained that I’ve observed a 2x CPU usage when running my insert test case in 11.2.0.4 vs. 11.2.0.2 I discussed that with @martinberx @OracleSK @TanelPoder @xtner @Ycolin @fritshoogland @lleturgez @LucaCanaliDB on twitter and it became clear that: ‘perf’ is the tool to use when investigating CPU usage. we must be use hardware… 

Variations on 1M rows insert (4): IN MEMORY

By Franck Pachot . Oracle In-Memory option is for reporting. Oracle has chosen an hybrid approach: maintain the In-Memory Column Store in addition of the buffer cache. Dont’ forget our In-Memory event, but for the moment, let’s try the 1M row insert when the target table is IN MEMORY. 12c I’ve done the previous variations on 11g because I wanted… 

Matching SQL Plan Directives and queries using it

By Franck Pachot . This is another blog post I’m writing while reviewing the presentation I’m doing next week forSOUG and next month for DOAG. You have SQL Plan Directives used by several queries that have same kind of predicates. And queries that can use several SPD. Can you match them? When a query uses a SPD (meaning that the… 

Matching SQL Plan Directives and extended stats

By Franck Pachot . This year is the year of migration to 12c. Each Oracle version had its CBO feature that make it challenging. The most famous was the bind variable peeking in 9iR2. Cardinality feedback in 11g also came with some surprises. 12c comes with SPD in any edition, which is accompanied by Adaptive Dynamic Sampling. If you want… 

Variations on 1M insert (2): write commit

In this blog post, I will try to do the same than my colleagues about Oracle and for PostgreSQL. As a reminder, we’ve seen in my previous blog post that SQL Server is designed to commit transactions implicitly by default and inserting 1M rows in this case may have a huge impact on the transaction log throughput. Each transaction is… 

Variations on 1M rows insert (4): APPEND_VALUES

By Franck Pachot . In the first variation I did a bulk insert with the PL/SQL FORALL statement. A comment suggests to add the APPEND_VALUES hint that appeared in 11gR2. APPEND_VALUES hint does the same than APPEND but it’s for inserts with VALUES clause: It inserts in direct-path – directly into the datafile, bypassing the buffer cache. Of course, this… 

Variations on 1M rows insert (1): bulk insert

I think you already have read the interesting series of blog posts of my colleagues Franck and Daniel about inserting on 1 million rows for Oracle and PostGreSQL. So it’s time to write the first of the same series concerning SQL Server. First of all, just to clarify, the idea is not to make a direct comparison between Oracle, PostGreSQL and… 

Rebuilt index on increasing values after deletes?

By Franck Pachot . Yesterday while giving our Oracle tuning workshop I discussed with the customer about a job they have that rebuilds indexes every Sunday. Except in very rare cases Oracle indexes are maintained so that free space is reused by further inserts. But an index is an ordered structure. When we insert from a sequence, the value is… 

the fastest way to load 1m rows in postgresql

There have been several posts on how to load 1m rows into a database in the last days: Variations on 1M rows insert (1): bulk insert Variations on 1M rows insert(2): commit write Variations on 1M rows insert (1): bulk insert – PostgreSQL Variations on 1M rows insert(2): commit write – PostgreSQL Variations on 1M rows insert (3): TimesTen In…