ADO.NET DataTable or XML Documenr ?

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?
 
W

William Ryan eMVP

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
 
V

Val Mazur

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
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,744
Messages
2,569,483
Members
44,901
Latest member
Noble71S45

Latest Threads

Top