12c: OPTIMIZER_DYNAMIC_SAMPLING=11

Oracle 12c has a new feature related to optimizer dynamic sampling. The new level 11 is supposed to put the dynamic sampling on auto pilot and make the statistics available to other users. However, as soon as this was set, I started noticing processes spending significant time waiting for row cache latch. This was strange, especially having in mind that ASMM was configured. I checked the V$ROWCACHE  by using the following, fairly standard, query:

select (more...)

Oracle 12c, big table caching

In Oracle 11g,  there has been annoying change which has frequently had a seriously detrimental effect to the application performance. All tables, larger than 2% of SGA, were considered big tables and were read using direct reads into PGA, instead of SGA. That has had two undesired effects:

  • Increased paging, as PGA had to be expanded, in order to receive all those rows
  • No sharing, since the PGA is not visible from other processes (or (more...)

Smarter DG Broker in Oracle 12c

In Oracle 11G, DG Broker needed to be told whether the standby database was physical or logical. The command to add database in 11G was something like this:

ADD DATABASE <DB Unique Name> AS CONNECT IDENTIFIER is <TNS Descriptor>

MAINTAINED AS [PHYSICAL|LOGICAL];

Oracle 12c is definitely smarter and can figure it out on its own. The “ADD DATABASE” syntax is simpler:

DGMGRL for 64-bit Windows: Version 12.1.0.2.0 – 64bit Production

Copyright (more...)

Synthetic Full Backup for Oracle

Synthetic full backup is a method for combining incremental backup into a full backup. It is not a new thing, many backup utilities can do that with file system backups. It is also well described:

http://www.techworld.com/storage/what-are-synthetic-backups-1149/

http://www.webopedia.com/TERM/S/synthetic_backup.html

However, there is only one backup suite that can do that with Oracle RDBMS: Commvault 11.

How is it done?  Well, Commvault is a very well documented tool, the documentation is here:

(more...)

A New Version of an Old Trick

A long, long time ago, people started using the following SQL idiom:

with t as (select /*+ materialize */ …..)

select …. from t

If my memory serves me right, Jonathan Lewis was the first person whom I saw using this idiom. The use of that idiom was to speed create a global temporary table and reuse the query results, without having to re-execute query again. Here is an example:

SQL> set autotrace on

(more...)

After startup trigger on RAC

Recently, a colleague of mine had some problems with pinning application procedures into the shared pool. His database was upgraded to RAC and he wanted to pin the application procedures and packages into shared pool upon the database startup.
The non-RAC version of the database was using a shell script, something like $ORACLE_HOME/local/scripts/pin_procs.sh in the script that was starting DB when the system was booted
However, RAC starts the database automatically and no user (more...)

ASM 12c, OCR and voting devices II

I finished the installation of 12c cluster and noticed that I haven’t been asked for voting and registry devices as was previously the case. I had to create a single disk group. John Franklin, from LinkedIn RAC SIG suggested running ocrcheck command, so I did:

[grid@rac1 ~]$ ocrcheck -details
Status of Oracle Cluster Registry is as follows :
Version : 4
Total space (kbytes) : 409568
Used space (kbytes) : 1612
Available space (kbytes) : (more...)

ASM 12c – no voting/quorum device and OCR?

I installed my first 12c ASM (database is still 11.2.0.4) and I made the 11G disk layout: 2GB for voting/quorum, 2 GB for OCR. However, the installation procedure did not ask me for the voting and OCR devices. ASM came right up without them. So, the devices are not needed for 12c? What about upgrading from 11g, which did need the devices? The “crsctl” utility confirms that voting and OCR devices are (more...)

Oracle Database Transactions and Locking Revealed, by Tom Kyte and Darl Kuhn

I recently came across the book called “Oracle Database Transactions and Locking Revealed” by Tom Kyte and Darl Kuhn. Usually, any new book by Tom Kyte is a big deal and acquires a huge following very quickly. Strangely enough there was only a single review on the Amazon, before I added my own.

For the reasons unknown to me, this book is literally ignored. I haven’t seen posts on the oracle-l about it, on the (more...)

PostgreSQL Hints and DBMS_STATS

For those who don’t know,‭ ‬it is now possible to use hints on PgSQL.‭ ‬Here
is how things work:

-‭ ‬Download and install the extension from the home page:

‭  ‬http://sourceforge.jp/projects/pghintplan/

If you are using Red Hat derivative,‭ ‬like me,‭ ‬it’s a simple RPM package.‭ ‬Check the content of the package,‭ ‬like this:

[‬mgogala@pg91‭ ~]‬$‭ ‬rpm‭ ‬-qa|grep pg_hint

pg_hint_plan93-1.1.3-1.el6.x86‭_‬64‭
[‬mgogala@pg91‭ ~]‬$
‭[‬mgogala@pg91‭ ~]‬$‭ ‬rpm‭ ‬-ql pg_hint_plan93-1. (more...)