Tag Archives: database

Today’s Nugget: Materialized Views

As I’m still trying to get my feet under the door at my new gig, here’s another nugget in place of a real blog entry. While troubleshooting for a client, I noted that there were three types of materialized view. I knew this before, sort of, but this troubleshooting exercise was a great aide memoire.

The three types of materialized views:

  1. Read-only
  2. Updateable
  3. Writeable

The read-only MV omits the FOR UPDATE clause in its DDL during creation and does not permit DML.

The updateable MV includes the FOR UPDATE clause in its DDL and is included in a materialized view group.  This allows changes made to the MV to be pushed back to the ‘master’ during a refresh.

The writeable MV includes the FOR UPDATE clause in its DDL, but does not belong to a materialized view group.  All changes made to the MV are lost during a refresh.

 

Tagged , , , ,

OLTP Compression vs. Single Row Inserts

Day 3 of my new gig and I hit a rare bug with OLTP compression (new in 11g) while executing single-row INSERT statements.

Luckily, my new colleagues are excellent notekeepers as well as excellent DBAs – they had seen it before and quickly found the workaround they’d used previously. Basically, the session got hung trying to find free space in which to put the new block.

And, yes, this was on an Exadata box, so I was able to recommend EHCC as an alternative to OLTP compression 🙂

Tagged , , , , ,
%d bloggers like this: