2009-12-21 92 views
0

爲什麼在使用基於氧氣/文件的查詢時,xquery需要10分鐘才能在sql server中執行(2MB xml文檔存儲在一列中)而14秒呢?SQL Server中的XQuery性能

SELECT model.query('declare default element namespace "http://www.sbml.org/sbml/level2"; 
for $all_species in //species, $all_reactions in //reaction 
where data($all_species/@compartment)="plasma_membrane" and $all_reactions/listOfReactants/speciesReference/@species=$all_species/@id 
return <result>{data($all_species/@id)}</result>') from sbml; 
+0

表中有多少行? – gbn 2009-12-21 17:02:50

+0

你可以發佈一個XML(模型)字段嗎? – 2009-12-21 17:06:52

+0

只有1行,但該模型列中的數據爲2mb – 2009-12-22 08:08:40

回答