Skip to Main Content

Database Software

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!

How can I fix the error "ORA-19022: Unoptimized XML construct detected." ?

DaianeMar 6 2014 — edited Mar 21 2014

I am using Oracle xmldb express 11 on Linux server (Ubunto).

I have a table that they content is distributed into 26.414 xml files. It is about 512 MB.

How can I fix the error "ORA-19022: Unoptimized XML construct detected." ?

My scripts are listed below.

$ sqlplus /nolog @/home/arwen/daiane_oracle/OracleQueryT/q2/q2.sql;

file: q2.sql

-----------------------------------------------------------

CONNECT daiane/daiane

SPOOL /home/arwen/daiane_oracle/OracleQueryT/q2/q2.lst

SET LINESIZE 100

SET PAGESIZE 50000

SET TIMING ON

SET XMLOptimizationCheck ON

SET FLUSH ON

ALTER system set diagnostic_dest='/home/arwen/daiane_oracle/OracleQueryT/q2';

ALTER SESSION SET TRACEFILE_IDENTIFIER = 'my_trace_id';

EXEC DBMS_SESSION.SET_SQL_TRACE(sql_trace => TRUE);

XQUERY  fn:collection("oradb:/HR/TB_INEX2009")//article [ora:contains(.//text() , "Nobel prize") > 0]

/

EXEC DBMS_SESSION.SET_SQL_TRACE(sql_trace => FALSE);

SPOOL OFF

EXIT

----------------------------------------------------------------------------------------

output file: q2.lst

------------------------------------------------------

System altered.

Elapsed: 00:00:00.11

Session altered.

Elapsed: 00:00:00.00

PL/SQL procedure successfully completed.

Elapsed: 00:00:00.00

ERROR:

ORA-19022: Unoptimized XML construct detected.

Elapsed: 00:00:00.02

PL/SQL procedure successfully completed.

Elapsed: 00:00:00.00

---------------------------------------------------

Regards,

Daiane.

Comments
Locked Post
New comments cannot be posted to this locked post.
Post Details
Locked on Apr 18 2014
Added on Mar 6 2014
9 comments
4,889 views