XMLAGG performance problems
411850Jan 29 2007 — edited Feb 1 2007Hello,
I've been having performance problems with one query using XMLAGG. Explain plan shows that all tables are joined using correct indexes - there is nothing wrong with it. After series of experiments with the query I found out that the problem is in use of XMLAGG function. It aggregates the data before submitting it to the result XML document.
I there any way to generate something like
<Main attr1="...">
<el1>...</el1>
<el2>...</el2>
<SubElement>
<row>row1 from the database</row>
<row>row2 from the database</row>
....
<row>rowN from the database</row>
</SubElement>
<Main>
without using XMLAGG in the subquery or somehow switch the aggregation off? I dont really need the records to be aggregated, all I need is to be able to generate multiple record based XML in the subquery which would have normally failed on (single-row query returned more than one record exception) without XMLAGG.
Thanks in advance
Alexey