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!

Newbie question on indexing XML type

2823224Nov 3 2009 — edited Nov 4 2009
I cannot get a query to use an index I created for an XML type. Here is my setup:

create table XmlTest( id number,
data_xml XMLType)
XmlType data_xml STORE AS CLOB;

I inserted 10,000 records like this ( each record has a unique id):

insert into XmlTest(id, data_xml) values
( 1
, XMLType('<company>
<department>
<id>10</id>
<name>Accounting</name>
</department>
</company>'));


I then created this index:

CREATE INDEX xmltest1
ON xmltest (extractValue(data_xml, '/company/department/id'));


When I run this query, it takes a long time - 12 seconds.

SELECT id from xmltest
WHERE EXISTSNODE( data_xml, '/company/department[id="37500"= 1;

it is doing a full table scan. What is wrong with my index?

Thanks!

Comments

version of SQLDev?

user12213655

Hi,

The version is : 4.1.1

weird, weird, weird, and...weird

but a bug

user12213655

Do you have the same problem ?

Any idea where this issue could come from ?

thatJeffSmith-Oracle

does it matter? it's a bug, we'll fix it

1 - 5
Locked Post
New comments cannot be posted to this locked post.

Post Details

Locked on Dec 2 2009
Added on Nov 3 2009
1 comment
2,653 views