Posts

Showing posts from September, 2014

Difference in performance using ALL_* vs. USER_* tables

An interesting discussion on the Oracle-L mailing list recently highlighted the differences between using a query such as this; SELECT COUNT(1) FROM DUAL WHERE EXISTS (SELECT 1 FROM ALL_SYNONYMS WHERE SYNONYM_NAME = :B1 AND OWNER = 'USER'); And this: SELECT COUNT(1) FROM DUAL WHERE EXISTS (SELECT 1 FROM USER_SYNONYMS WHERE SYNONYM_NAME = :B1);  I assumed, naively perhaps, that there wouldn't be that much difference, but how wrong could I be...? Turns out, very much so!  This is the output of autotracing those two queries with a buffer cache flush in between just to be sure there wasn't any untoward advantage in running one first.  Left column is ALL_ and the right column is USER_.  I've highlighted what appear (to me!) to be the biggest differences. buffer is pinned count 1 3 buffer is not pinned count 250 66 bytes received via SQL*Net from client 464 441 bytes sent via SQL*Net to client 24957 24960 calls

DB Control/OEM 11g and a side note on the Oracle inventory

I was experiencing a problem with the Performance page on 11g OEM, where the date chooser would only show "January 0" when I switched to "Historical".  This is obviously sub-optimal! Turns out, after much hunting, there is a known bug and a patch for this issue!  Hurrah!  It doesn't seem to be widely noted (only 25 downloads!) so this is for my reference as much as anyone else's. The bug is 8521404 , and the corresponding patch is here .  Simple to apply - take down dbconsole with emctl, opatch apply, start dbconsole. At least it is... if your inventory is there. Turns out, that whoever created our data guard standby didn't bother to create: /etc/oratab A central inventory It was simple enough to resolve using OUI: ./oui/bin/runInstaller.sh -silent -attachHome -invPtrLoc "/etc/oraInst.loc" oracle_home="$ORACLE_HOME" oracle_home_name="Ora11g_Home" Still annoying.  I hate to think what would have happened wer

DBControl/11g OEM and Shared Servers - Part II

As noted in this post here , I previously had problems with the 11g EM Agent connecting to the database using a shared server instead of a dedicated one. I've recently had the joy of performing a switchover of a dataguard primary & secondary so have had to re-create a bunch of stuff, including the OEM repositories.  Due to some major configuration issues with the standby I've ended up dropping and recreating the repositories completely, so have had to revisit this issue. I followed my own advice in the previous post, which got rid of one of the sessions using shared servers, but the OMS was still connecting using a shared server.  I have a vague memory of resolving this before but the details eluded me, so I did it this way. cd $ORACLE_HOME/$HOSTNAME_SERVICENAME/ (e,g. cd $ORACLE_HOME/server1.domain.local_ORCL/ vi sysman/config/emoms.properties Find the line starting: oracle.sysman.eml.mntr.emdRepConnectDescriptor After the SERVICE_NAME or SID section, add: (SERV