ADO.NET DataTable or XML Documenr ?

  • Thread starter Thread starter Marlon R
  • Start date Start date
M

Marlon R

I'm look for the best performance to pull data from SQL Server 2000 to
populate either a DataTable or a Xml Document.

Which method yields the best performance and uses less resources?
 
It depends on the way you write out the XML Document but if you use
identical structure, I've found them dead ringers if I'm coding the exact
same stuff. Usually the hit is in loading the thing, either from the DB or
from a ReadXML. In general, db queries seem notably quicker than ReadXML
statements of exact same records but there are a whole lot of factors that
can influence it. I will tell you that using DataSets is a lot cleaner code
wise in most instances. You can take a whole Dataset and make an XML doc out
of it with DataSet.WriteXML(). Again there are too many factors that can
sway things back and forth, but for absolute apples to apples, I don't think
the difference has ever been worth metioning.

--

W.G. Ryan, eMVP

http://forums.devbuzz.com/
http://www.knowdotnet.com/williamryan.html
http://www.msmvps.com/WilliamRyan/
http://www.devbuzz.com/content/zinc_personal_media_center_pg1.asp
 
Hi,

I think populating of the DataSet would be faster, but best way to see it is
to make your own tests. It might depend on a data
 
Back
Top