Dealing with technical questions about #Oracle
During the OCM Preparation Workshop today in Bucharest, we got into a discussion about parallel inserts vs. direct load with append hint, where I said something like: „I think a parallel insert is always* also a direct load.“ Most attendees were satisfied with that, but some still looked a bit sceptical. And I was also not 100% sure about it. While the others practiced, I did a brief research and came up with this answer from Tom Kyte and quoted him: „Parallel is always a direct path, if you go parallel, you will be appending.“ Everybody in the room was immediately convinced – only I felt a bit uncomfortable with the outcome myself. After all, I don’t want to teach people to blindly follow my or any other guys claims without checking it if possible. And as with so many other claims about Oracle, it is possible to prove (or falsify) it with little effort:
SQL> grant dba to adam identified by adam;
Grant succeeded.
SQL> connect adam/adam
Connected.
SQL> create table t as select 'TEST' as col1 from dual connect by level<=1e6;
Table created.
SQL> select bytes/1024/1024 from user_segments;
BYTES/1024/1024
---------------
13
SQL> delete from t;
1000000 rows deleted.
SQL> commit;
Commit complete.
SQL> insert into t select 'TEST' as col1 from dual connect by level<=1e6;
1000000 rows created.
SQL> commit;
Commit complete.
SQL> select bytes/1024/1024 from user_segments;
BYTES/1024/1024
---------------
13
The above shows that a conventional insert reuses the empty space before the high water mark of the table and does not allocate additional extents. Now I’m going to do a parallel insert:
SQL> delete from t;
1000000 rows deleted.
SQL> commit;
Commit complete.
SQL> alter table t parallel;
Table altered.
SQL> alter session enable parallel dml;
Session altered.
SQL> insert into t select 'TEST' as col1 from dual connect by level<=1e6;
1000000 rows created.
SQL> commit;
Commit complete.
SQL> select bytes/1024/1024 from user_segments;
BYTES/1024/1024
---------------
24.375
QED! Obviously, the parallel insert appended rows after the high water mark – it was a direct load, in other words. That is in itself not so spectacular, but that little anecdote illustrates the in my opinion proper way to deal with technical questions about Oracle: Always try to back up your assumptions respectively claims with proof instead of relying only on (your or others) authority.
In other words: Don’t believe it, test it! 🙂
*Addendum: Never say always, I always say: If you include the NOAPPEND hint to the parallel insert, it will not be done as a direct load. Thank you guys for pointing that out!
Impressions from #oug_ire 2014
The Oracle User Group Ireland had its annual conference for 2014 at the Convention Centre in Dublin – which is a very nice location:
There have been many well known Oracle Experts speaking, as you can see from the agenda. Oracle University was represented by Joel Goodman and myself – we really enjoyed talking there and listening to the other speakers 🙂
The first presentation I attended was delivered by Tom Kyte, who in the absence of Maria Colgan delivered an Introduction to the New Oracle Database In-Memory Option. This extra charged option will probably be available with 12.1.0.2, which we expect to be released this calendar year. Safe Harbor etc. as usual. One key point that I took away here was that it is extremely easy to implement the In-Memory Option: Just set one initialization parameter and designate the use on the segment level with alter table e.g. Especially, the storage structure on disk remains unchanged and the whole thing is completely transparent for the application layer.
Next talk was delivered by fellow Oakie Tim Hall: An Oracle DBA’s Guide to WebLogic Server.
He tried to pack all the information that he wished he knew before he dealt with WebLogic for the first time into that presentation. Very useful indeed for starters, I suppose. There was no single key point here to highlight, instead we got a collection of small but helpful tips that I will definitely come back to when implementing WebLogic myself.
Next I went to Simon Haslam, who talked about What’s So Special about the Oracle Database Appliance?
Some key points here: ODA is definitely to be considered for rapid RAC deployment, especially for small to midsized projects with less demand for extremely good I/O performance. Also, it is probably a clever move to install it as virtualized platform based on Oracle VM, even in case that at first only databases are supposed to run there. This is easy to install initially (but an effort to change that after the fact) and has no negative performance impact.
Afterwards I did my own two presentations: Real-Time Query for Data Guard 11g in Action and Data Guard 12c New Features in Action
Many thanks to my dear colleague Mina Sagha Zadeh who took the picture and introduced my talk in the most charming and flattering way I have ever experienced so far 🙂
All in all it was a fantastic event in Dublin, kudos to the Oracle User Group Ireland for organizing and running it so well – great job!
Active Data Guard – what does it mean?
There are misconceptions and half-truths about that term that I see time after time again in forums, postings and comments.
Some people think that Active Data Guard is a fancy marketing term for Standby Databases in Oracle. Wrong, that is just plain Data Guard 🙂
Most people think that Active Data Guard means that a Physical Standby Database can be used for queries while it is still applying redo. Not the whole truth, because that is just one feature – Real-Time Query – which is included in the Active Data Guard option.
Active Data Guard is an option, coming with an extra charge. Active is supposed to indicate that you can use the standby database for production usage – it is not just waiting for the primary database to fail.
In 11g, Active Data Guard includes three features:
- Real-Time Query
- Automatic Block Media Recovery
- Block Change Tracking on the physical standby
In 12c, Active Data Guard got even more enhanced and includes now the features:
- Real-time Query
- Automatic Block Media Recovery
- Block Change Tracking on the physical standby
- Far Sync
- Real-Time Cascade
- Global Data Services
- Application Continuity
- Rolling Upgrade using DBMS_ROLLING
The bad news is that many of the 12c Data Guard New Features require Active Data Guard

