XML will always be slower than a good database, particularly for large
volumes of data.

Consider a scenario where you have 1000 records that are about 500 bytes
each. If it's in a database, it's already in a read-optimized format
that can be quickly queried and send back only the needed results. With
XML, you'd first need to read the WHOLE file (500k+, with tags) from
disk, run the read text through CF's XML parser, then run Xpath or
something to retrieve the part you need.

Also, XML tags are very verbose and thus take up a lot more disk space
than a binary-format database. This impacts parse time and file read
time. If you had to use XML for something large, I'd definitely consider
caching the CF XML object in a persistent scope if possible.

That said, XML is great for situations where there won't be too many
records or where a database is unavailable or too complex for a simple
project. It's also better for deeply hierarchical data, which doesn't
map well to RDBMSs.

Kam

-----Original Message-----
From: Johnny Le [mailto:[EMAIL PROTECTED] 
Sent: Thursday, October 28, 2004 7:46 AM
To: CF-Talk
Subject: XML faster?

Is it faster to connect to an XML file than to a database?  Assuming
both store the same amount of data.  I know that getting the data in and
out is easier with a database, but I wonder if it is faster with XML.
XML vs. Access?
XML vs. SQL Server?
XML vs. MySQL?
XML vs. Oracle?

Johnny



~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~|
Purchase from House of Fusion, a Macromedia Authorized Affiliate and support the CF 
community.
http://www.houseoffusion.com/banners/view.cfm?bannerid=35

Message: http://www.houseoffusion.com/lists.cfm/link=i:4:182842
Archives: http://www.houseoffusion.com/cf_lists/threads.cfm/4
Subscription: http://www.houseoffusion.com/lists.cfm/link=s:4
Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=11502.10531.4
Donations & Support: http://www.houseoffusion.com/tiny.cfm/54

Reply via email to