dbTalk Databases Forums  

xml column Performance problem

microsoft.public.sqlserver.xml microsoft.public.sqlserver.xml


Discuss xml column Performance problem in the microsoft.public.sqlserver.xml forum.



Reply
 
Thread Tools Display Modes
  #1  
Old   
bala
 
Posts: n/a

Default xml column Performance problem - 05-27-2010 , 10:20 AM






Hello,
The following is my XML data

<specification>
<item name="bore" measure="mm">96</item>
<item name="stroke" measure="mm">117</item>
<item name="power" measure="hp">573</item>
</specification>

I have created schema for this and defined xml column using this.
Also I have created the primary and secondary xml index on this column

Thanks,
Bala

I have tried this following query

select Spec.query('//item[@name eq "bore"][@measure eq
"mm"]').value('/','int') bore
from EngineSpecNew
where

Spec.query(N'//item[@name="power"][@measure="hp"]').value('/','int')>100

which takes almost 3 to 4 seconds querying 14000 records and returning almost
6000 records

Am I doing anything wrong with the query?
Or is there any other way of doing it.
Please help me regarding this

Reply With Quote
Reply




Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off



Powered by vBulletin Version 3.5.3
Copyright ©2000 - 2012, Jelsoft Enterprises Ltd.