|
|
|
SSC-Addicted
      
Group: General Forum Members
Last Login: Saturday, May 11, 2013 8:17 AM
Points: 460,
Visits: 2,521
|
|
I dont think FOR XML will give you better performance. FOR XML may not be used as a means to increase performance. It is usually used when an XML output need to be passed to the calling application.
If you have a slow running query, you should look at the execution plan to see what makes the query slow. The execution plan might tell what is causing the problem.
.
|
|
|
|
|
Forum Newbie
      
Group: General Forum Members
Last Login: Wednesday, August 04, 2010 2:45 AM
Points: 1,
Visits: 3
|
|
Hi All, this article helps a lot to get an idea of solving my problems regarding sql-server data. my query looks like this: SELECT Company.UnternehmenName, Company.UnternehmenID, Department.Bereichname, Department.BereichID, Process.ProzessName, Process.ProzessID, SubProcess.SubProzessName, SubProcess.SubProzessID FROM Company
LEFT JOIN Department ON Company.UnternehmenID = Department.BereichUnternehmenID left JOIN Process ON Department.BereichID = Process.BereichID left join SubProcess on Process.ProzessID = SubProcess.ProzessID for xml auto,elements,type, ROOT('Company_Structure')
Anyhow the call of cmd.ExecuteXmlReader() runs into error. (InvalidOperationException) What do I miss?? Regards Jörn
|
|
|
|
|
SSC-Addicted
      
Group: General Forum Members
Last Login: Saturday, May 11, 2013 8:17 AM
Points: 460,
Visits: 2,521
|
|
Does this query run on SSMS? It looks like there is something going wrong with the query and it is not returning an XML stream.
.
|
|
|
|