Skip to Main Content

SQL & PL/SQL

Announcement

For appeals, questions and feedback about Oracle Forums, please email oracle-forums-moderators_us@oracle.com. Technical questions should be asked in the appropriate category. Thank you!

Optimization XMLAGG

967661Oct 30 2012 — edited Oct 31 2012
hi,

Could you tell me if I can optimize this request ?
Is there an other function than XMLAGG more faster ?

select 
       su_so, 
       XMLAGG(ext.XML ORDER BY ext.nor_so) XML
 from 
       W_EXT_N  ext 
 where nor_som > 0 group by su_sr;
Explain plan :
-------------------------------------------------------------------------------------------
| Id  | Operation                    | Name       | Rows  | Bytes | Cost (%CPU)| Time     |
-------------------------------------------------------------------------------------------
|   0 | SELECT STATEMENT             |            |   169 | 11323 |  1549   (1)| 00:00:19 |
|   1 |  SORT GROUP BY               |            |   169 | 11323 |  1549   (1)| 00:00:19 |
|   2 |   TABLE ACCESS BY INDEX ROWID| W_EXT_N  |  2527 |   165K|  1549   (1)| 00:00:19 |
|*  3 |    INDEX FULL SCAN           | W_EXT_N_IDX |  2527 |       |    10   (0)| 00:00:01 |
-------------------------------------------------------------------------------------------
 
Predicate Information (identified by operation id):
---------------------------------------------------
 
   3 - access("NOR_SO">0)
       filter("NOR_SO">0)
Thanks
Comments
Locked Post
New comments cannot be posted to this locked post.
Post Details
Locked on Nov 28 2012
Added on Oct 30 2012
9 comments
1,279 views