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.

Can you have pending system statistics?

By Franck Pachot . Your system statistics seems to be wrong and you want to gather or set more relevant ones. But you don’t want to see all your application execution plans changing between nested loops and hash joins. For object statistics, we can gather statistics in a pending mode, test them in a few sessions, and publish them when… 

Flame Graph for quick identification of Oracle bug

By Franck Pachot . Most of my performance stores start with a screenshot of Orachrome Lighty my preferred tool to have a graphical view of the database performance, in Standard and Enterprise Edition without any options: I’m investigating a long running query. That query obeys to the most important rule in Oracle performance: parce once (CPU) – execute many (IO+CPU) …… 

SQL Server 2016: Live query statistics

During my tests of the SQL Server 20126 CTP2, I noticed an additional icon on SQL Server Management studio which is close to the Actual Execution Plan button as shown below: I decided to take a look at the SQL Server 2016 BOL and I found a topic about this feature. It seems to be a funny feature. So after… 

Testing postgresql development snapshots

If you want to test some of the features that will be coming with the next postgresql release even before an official beta version is released you can use the daily development snapshot . Here is a simple makefile for downloading the snapshot, compiling the source and starting up the postgresql instance ( Attention: Makefiles work with tabs, so make… 

An alternative to DBA_EXTENTS optimized for LMT

By Franck Pachot . This is a script I have for several years, when tablespaces became locally managed. When we want to know to which segment a block (identified by file id, block id) belongs to, the DBA_EXTENTS view can be very long when you have lot of datafiles and lot of segments. This view using the underlying X$ tables… 

Oracle memory advisors: how relevant ?

By Franck Pachot . Do you look at memory advisors? I usually don’t but I still show them during the performance tuning workshop because there is no easy way to get an idea about memory sizing. This morning, while giving the training, I’ve shown on our workshop environment what the problem is: they are based on statistics cumulated from instance… 

How to disable a SQL Plan Directive permanently

By Franck Pachot . In 12c you will see a lot of SQL Plan Directives. Some are useful to get better execution plans, but some will trigger too much Adaptive Dynamic Sampling and that can become a big overhead, especially in Standard Edition. Then you don’t want to drop them – or they will reappear. You can disable them, but… 

SAP HANA SQL scripting optimization: the CE Functions

In SAP HANA, you have two possibilities to create the Calculated Views: Using the graphical method Using the scripting method with CE functions In this blog, I will demonstrate that CE Functions can improve performances from a Calculated View. First, I will give you some general information regarding the CE Functions. After that, I will show you the two different… 

SQL Server 2016 CTP2 : first thoughts about tempdb database

In my first blog about SQL Server 2016, I noticed during the SQL Server installation process that we are able to configure the number of files for tempdb. This is surely a great improvement but at this point, you may think that the configuration of the tempdb database is finished but in fact you’re wrong. Let me say why. First… 

Convert a snapshot standby to a new database

By Franck Pachot . A snapshot standby database is a nice solution when you want a temporary copy of the primary where you can do whatever you want (test a bug fix for example) and then convert it back to physical standby. But you don’t want to stay in that state definitely because you will accumulate archived logs from the… 

SQL Server 2016 CTP2 is out!

As announced by Satya Nadella at the Microsoft Ignite keynote in Chicago, SQL Server 2016 CTP2 is finally out and it follows a previous private CTP. This CTP will provide some interesting features to evaluate as: Always Encrypted Stretch databases Operational analytics However, this CTP does not stop here and will incorporate a myriad of new features and many improvements,… 

12c Dynamic Sampling and Standard Edition

By Franck Pachot . 12c is coming with more dynamic sampling, now called dynamic statistics and using the new Adaptive Dynamic Sampling algorithm. The goal is to have better estimations and better estimations gives better execution plans. However, this new approach will increase parse time because dynamic sampling kicks in more often, reads more blocs, and run more queries. It’s…