Oracle Server - Enterprise Edition - Version: 11.2.0.2 to 11.2.0.3 - Release: 11.2 to 11.2 Oracle Server - Enterprise Edition - Version: 10.2.0.5 to 10.2.0.5 [Release: 10.2 to 10.2] Information in this document applies to any platform.
1.2SYMPTOMS
SQLs using WM_CONCAT function run slower in 11.2.0.2 and 10.2.0.5 onward. Execution plans can be exactly same as previous releases that used to run well. TKPROF shows much more QUERY and CURRENT gets. AWR or Statspack statistics show more counts for 'lob reads' and 'lob writes'.
WMSYS.WM_CONCAT is Workspace Manager internal and undocumented function and not intended to be used by customer applications. This function concatenates the values of the input column. For example:
select deptno,wm_concat(ename) from emp group by deptno ;
Upgraded database to 10.2.0.5 or 11.2.0.2 ( and above ).
The definition of WMSYS.WM_CONCAT function has changed in 11.2.0.2 and 10.2.0.5 onward to use CLOB.
10.2.0.5, 11.2.0.2+ FUNCTION wm_concat( P1 VARCHAR2 IN ) RETURNS CLOB.
10.2.0.4-, 11.1.0.7-, 11.2.0.1 FUNCTION wm_concat( P1 VARCHAR2 IN ) RETURNS VARCHAR2
1.4CAUSE
WMSYS.WM_CONCAT using CLOBs has serious performance impact when it is accessed excessively.
1.5SOLUTION
Since WMSYS.WM_CONCAT is undocumented and not intended to be used by customer's application, it is suggested that customers write their own customized functions serving the purpose.