Re: Modify in a large xml file
- From: "Michael Rys [MSFT]" <mrys@xxxxxxxxxxxxxxxxxxxx>
- Date: Mon, 2 Apr 2007 22:45:53 -0700
Since you do it on a variable, I assume that the processing parses the whole
XML document into the internal node table, then executes the update and
writes the data back...
Depending on the size and structure you may be better off with having it in
a temp table with an index or doing it inside the CLR.
Best regards
Michael
"blam" <bendlam@xxxxxxxxx> wrote in message
news:1173476464.372601.230830@xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
I have an sp that takes an xml data type.
When I do something like
SET @Xml.modify('
replace value of (/schedule/RevisionNumber/text())[1]
with sql:variable("@CurrentRevNo")
it seems to do alot of reads and slows performance.
My question is does the SQL Server load the entire XML file in memory
then replace the value?
Do you think it would be better to pass the XML into a CLR function
that would use a SAX parser to modify the value and pass it back to
the sp?
.
- Prev by Date: Re: SQL Server 2005 periodic performance degradation
- Next by Date: Re: SSMS Bug with extended properties on xml indexes?
- Previous by thread: Re: SQL Server 2005 periodic performance degradation
- Next by thread: Re: SSMS Bug with extended properties on xml indexes?
- Index(es):
Relevant Pages
|