Comparison of databases and XML data read performance

xiaoxiao2021-04-07  322

Database and XML data read performance comparisons.

Hardware: CPU P4 Celero 2.2g, memory 512M

Operating system: Windows XP SP2

Database: Access2002

Software environment: JDK1.4, Eclipse3.01

The database is connected by JDBC-ODBC bridges, and XML access is in a SAX mode. Performance parameters are as follows:

Record number XML read time (ms) Database reading time (milliseconds)

100 156 941000 500 933000 828 945000 1000 10910000 1485 94100000 9172 125

Obviously, the performance of the database has exceeded XML, and the amount of XML has access time over 1 second when more than 10,000 records, and the performance is unbearable. The database is not sensitive to data volume.

Some explanations:

1. The Access database is not enough for large data volume, and it is best to test a professional database such as SQLServer;

2. The way the JDBC-ODBC bridge is that the lowest efficiency in the database access method, that is, other methods can further improve the performance of the database.

3. XML Access I not directly write SAX code, but through the code automatically generated by EMF (ECLIPSE MODEL FRAMEWORK), the number of layers that the function call is increased, and there is some impact on performance, but the impact will not be too Big, for IO, the time of function jump can be ignored.

4. XML should be suitable for small amounts of data storage, preferably less than 10,000 records, so access time can be maintained below 2 seconds, and it is barely acceptable.

5, the layered data can only be used in XML; the relationship database, the size of the data, and the complexity of the database operation. The amount of data is large, and the data has a complex query, modification, etc., it is recommended to use the database. In addition, the security of the database is also good.

I hope this group of data can provide a little revelation on those who use XML as a data source.

转载请注明原文地址:https://www.9cbs.com/read-132441.html

New Post(0)