The me开发者_Python百科talink article [ID377037.1] I have states that the issue applies to Oracle 10.2.0.1 to 10.2.0.4 but there is no resolution to the issue. Does anyone know if this issue is fixed on Oracle 11.2.0.1?
Apparently not, the 9.2 version is still faster. But the difference isn't large, and if you're very worried about performance it looks like DBA_SYNONYMS is almost as fast. (But you'd want to think carefully before granting access to DBA_ views.)
The performance of these data dictionary objects fluctuate wildly, the times here are very rough estimates:
--0.3 seconds:
select count(*) from all_synonyms;
--0.1 seconds:
select count(*) from sys.all_synonyms_920x;
--0.2 seconds:
select count(*) from dba_synonyms;
--0.125 seconds:
select * from all_synonyms where synonym_name = 'APEX_ITEM';
--0.03 seconds:
select * from sys.all_synonyms_920x where synonym_name = 'APEX_ITEM';
--0.05 seconds:
select * from dba_synonyms where synonym_name = 'APEX_ITEM';
Metalink Doc ID 1242844.1 says poor performance of ALL_SYNONYMS in 11.2.0.1 and 11.2.0.2 is fixed in 11.2.0.3. The document also provides the DDL to retrofit the 11.2.0.3 view to the earlier releases.
It's not fixed in 11.2.0.3, we are running 11.2.0.3.6 and getting problems with ALL_SYNONYMS. Toad queries ALL_SYNONYMS when it starts and the Toad users are complaining about connection time since the upgrade. I've found that if you add the RULE hint to the view it improves the performance massively. In our case down from 30secs to 4secs.
精彩评论