Skip to Main Content

DevOps, CI/CD and Automation

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!

Interested in getting your voice heard by members of the Developer Marketing team at Oracle? Check out this post for AppDev or this post for AI focus group information.

XQuery query over just one single xml file returns data but query over lots of XML didn't return any

DaianeMar 11 2014 — edited Mar 26 2014

Hello,

Please, help me.

I am depending on this query working fine to complete a academic task.

On the Oracle xml database Express version 11.2.0.2.0 I used data from wikipedia to populate my table of XML files and W3C use case as a query model (XQuery and XPath Full Text 1.0 Use Cases).

I have a table with 26.416 split xml files into some xml columns, it is about 512 MB.

CREATE TABLE tb_wikipedia_inex (DOC VARCHAR(30) NOT NULL,

                                XML XMLTYPE,

                                PRIMARY KEY (DOC)

                                );

I want to perform a query (full text) on all those files but when I execute a xquery it retuns nothing or warnings. Unfortunatelly I understand nothing from trace file.

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

SQLPLUS:

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

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

TRACE FILE:

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

System altered.

Elapsed: 00:00:42.08

Session altered.

Elapsed: 00:00:00.00

PL/SQL procedure successfully completed.

Elapsed: 00:00:00.00

Elapsed: 00:00:00.05

Execution Plan

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

Plan hash value: 1500681423                                                                      

                                                                                                 

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

                                                    

                                                                                                 

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

----------                                                                                       

                                                                                                 

| Id  | Operation                           | Name                   | Rows  | Bytes | Cost (%CPU)|

Time     |                                                                                       

                                                                                                 

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

----------                                                                                       

                                                                                                 

|   0 | SELECT STATEMENT                    |                        |  8168 | 16336 |    29   (0)|

00:00:01 |                                                                                       

                                                                                                 

|   1 |  COLLECTION ITERATOR XMLSEQ FETCH   | XMLSEQUENCEFROMXMLTYPE |  8168 | 16336 |    29   (0)|

00:00:01 |                                                                                       

                                                                                                 

|   2 |   SORT AGGREGATE                    |                        |     1 |     2 |            |

         |                                                                                       

                                                                                                 

|*  3 |    COLLECTION ITERATOR PICKLER FETCH| XMLSEQUENCEFROMXMLTYPE |   408 |   816 |    66  (57)|

00:00:01 |                                                                                       

                                                                                                 

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

----------                                                                                       

                                                                                                 

                                                                                                 

Predicate Information (identified by operation id):                                              

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

                                                                                                 

   3 - filter(SYS_XMLCONTAINS(SYS_XQ_UPKXML2SQL(SYS_XQEXVAL(SYS_XQEXTRACT(SYS_XQCON2SEQ(VALUE(KOKBF$

))                                                                                               

                                                                                                 

              ,'/language/text()'),1,50),50,1,0),'java')>0)                                      

                                                                                                 

Note                                                                                             

-----                                                                                            

   - Unoptimized XML construct detected (enable XMLOptimizationCheck for more information)       

PL/SQL procedure successfully completed.

Elapsed: 00:00:00.00

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

How can I execute xquery over a bunch of xml files to obtain xml data?

Regards,

Daiane

Comments
Locked Post
New comments cannot be posted to this locked post.
Post Details
Locked on Apr 23 2014
Added on Mar 11 2014
4 comments
2,615 views