Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 8534661
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 11, 20262026-06-11T10:14:51+00:00 2026-06-11T10:14:51+00:00

I have a large xml stream I pass to a stored procedure, but I’m

  • 0

I have a large xml stream I pass to a stored procedure, but I’m getting a long response time of almost 1.30 minutes on a specific part of the xml which gets repeated alot.

I’ve checked the Execution Plan, and 2 sections of the xml structure takes up almost all of the processing time. I’ve also tried reading it into 2 temp tables first, before doing the insert, not that it helped. The XML is 368Kb in size, so I have a strong suspicion my xml is either wonky or i’m missing something to help ease the parsing.

Is there a better way to formulate the xml, to make it easier for Xpath() to parse? I really have no idea what else to do.

The structure of the xml is:

<root>
<someobject>
 <param1></param1>
 <param1></param1>
</someobject>
<somethingelse>
 <param1></param1>
 <param1></param1>
</somethingelse>
<row1>
  <param1></param1>
  <param1></param1>
  <param1></param1>
  <param1></param1>
  <param1></param1>
  <param1></param1>
  <param1></param1>
  <param1></param1>
</row1> 

The query I currently use:

Insert Into [Table] 
Select   
  XmlParam.Doc.value('fieldA[1]','UNIQUEIDENTIFIER')
,XmlParam.Doc.value('fieldB[1]','UNIQUEIDENTIFIER')
,XmlParam.Doc.value('fieldC[1]','UNIQUEIDENTIFIER')
,XmlParam.Doc.value('fieldD[1]','UNIQUEIDENTIFIER')
,XmlParam.Doc.value('fieldE[1]','UNIQUEIDENTIFIER')
,XmlParam.Doc.value('fieldF[1]','UNIQUEIDENTIFIER')
,XmlParam.Doc.value('fieldG[1]','bit')
,XmlParam.Doc.value('fieldH[1]','bit')
      From @Xml.nodes('//Flow/StepData') XmlParam(Doc)  

Thanks for the help!

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-11T10:14:52+00:00Added an answer on June 11, 2026 at 10:14 am

    Try this, it might be faster for you.

    Select   
       XmlParam.Doc.value('(fieldA/text())[1]','UNIQUEIDENTIFIER')
      ,XmlParam.Doc.value('(fieldB/text())[1]','UNIQUEIDENTIFIER')
      ,XmlParam.Doc.value('(fieldC/text())[1]','UNIQUEIDENTIFIER')
      ,XmlParam.Doc.value('(fieldD/text())[1]','UNIQUEIDENTIFIER')
      ,XmlParam.Doc.value('(fieldE/text())[1]','UNIQUEIDENTIFIER')
      ,XmlParam.Doc.value('(fieldF/text())[1]','UNIQUEIDENTIFIER')
      ,XmlParam.Doc.value('(fieldG/text())[1]','bit')
      ,XmlParam.Doc.value('(fieldH/text())[1]','bit')
    From @Xml.nodes('//Flow/StepData') XmlParam(Doc)  
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have a large amount of data stored in an XML file, 173 MB
I have a strange behavior when parsing a large xml (but I'm not sure
I have a very large xml file which I have stored in a longtext
I have a large xml file (approx. 10 MB) in following simple structure: <Errors>
I have a large XML, looking like this: <gender>M</gender> <last-name>*</last-name> <profession>2165dda2-dc59-41af-acb5-06d8914c4841</profession> <first-name>*</first-name> <mail-confirmation>1</mail-confirmation> <fax-confirmation>1</fax-confirmation>
I have a large XML file which in the middle contains the following: <ArticleName>Article
I have a large XML file (many MBs) that I cannot afford to download
I have a large xml file that looks like this: 20120124 07:30:15.301, saving to
I have a very large XML file which has like 40000 data, and when
I have a request that returns a large xml file. I have the file

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.