Xml retrieving is slower after adding xml index, any idea?

I have  a table, it has a field call extrafield, it stores xml like


<field name="name1"></field>
<field name="name2"></field>
...

I tested on 30k records, query like

select * from thetable where extrafields.value('(/field[@name="name2"]/.)[1]','int')<3000

takes around 8 seconds to run, but after I created xml index, I tested after each index created(primary, three different seconary on value,path and property), it takes far more than 8 seconds to run the same query, any idea why it does like that



thanks!





Answer this question

Xml retrieving is slower after adding xml index, any idea?