Almost all articles about the Access performance analysis of ADO databases believe that the performance of binary components always exceeds the ASP code that interprets execution. In fact, this is wrong. From the test results of this article, we can see that some times the performance of ASP code far exceeds the component.
I. INTRODUCTION
"The Earth is flat ..."
"The sun goes round the earth ..."
"Always access the database through components ...",
The above three propositions have two common features: first, they have all been thought to be true, and secondly, the three propositions are actually wrong.
We've all read countless articles suggesting that components encapsulate business logic and database access in Internet applications, but the actual performance data on this technology is rarely seen. With the release of Windows 2000, the performance of the IIS platform, especially the ASP, has been significantly improved. Because of the improvement of the early-binding, template buffering and so on, the ASP has the first-class performance in all aspects, such as accessing the database through ADO, formatting and outputting the recordset and so on.
From the test results, we can see that ASP is better than component in ADO database access, recordset format, and in some cases the difference between the two is unbelievable. Performance is always the primary factor for most Internet applications, so it is important to use the test tools to test the scenario thoroughly before you can determine the optimal solution based on hearsay or book knowledge.
All three sets of code in this article (ASP,VB and C + +) have been optimized before testing. To ensure that the coding and testing results of the code participating in the test are optimal in their respective fields, they have been tested several times. Some optimizations have not been done, in order for the code to reflect more realistically the typical situation that might occur in the actual application environment.
Second, test environment
This test is only done on Windows 2000 platforms, and test results may vary significantly on the Windows NT platform, so the results of the tests do not apply to the Windows NT platform. The following is a schematic and description of the system used for this test:
The client connects to the Web server through three Cisco 2924 switches because the test client and the Web server, and the database server, are located in a different physical location. All of these machines are in the same building, but the server is in the data center and the test client is in another room, and the client connects to the data center switch via a 400Mb Fast EtherChannel.
In this configuration, the overhead of the test case's network latency is very small. The traffic between the switches is always less than 5% of the capacity in the daily run.
Third, test code
Since this is a test of database access from ASP, VB components, and C + + components through ADO, the functionality of the test code is limited to creating a table from the result recordset. All test programs can be downloaded from the back of this article. The process of executing these programs is similar, as follows:
The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion;
products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the
content of the page makes you feel confusing, please write us an email, we will handle the problem
within 5 days after receiving your email.
If you find any instances of plagiarism from the community, please send an email to:
info-contact@alibabacloud.com
and provide relevant evidence. A staff member will contact you within 5 working days.
A Free Trial That Lets You Build Big!
Start building with 50+ products and up to 12 months usage for Elastic Compute Service