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...