XQuery performance in SQL Server
Posted
by Carl Hörberg
on Stack Overflow
See other posts from Stack Overflow
or by Carl Hörberg
Published on 2009-12-21T16:39:15Z
Indexed on
2010/03/27
12:13 UTC
Read the original article
Hit count: 297
Why does this quite simple xquery takes 10min to execute in sql server (the 2mb xml document stored in one column) compared to 14 seconds when using oxygen/file based querying?
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;
© Stack Overflow or respective owner