That just about brings us to the end of this guide to connecting to an Oracle database from an ASP application. We covered quite lot of ground here:
Before we finish this chapter, take look at the chart below comparing each of the common methods of data access for Oracle. I added an additional 7000 records to the emp table and then used each of the methods to retrieve these records and display them using an ASP script. Each method was executed three times and after each test I rebooted the server machine so that there would be very little chance of data being cached by either Oracle or the web server (for this test the web server also doubled as the Oracle database server to cut the time taken to shutdown and restart).
|
In these tests, MSDAORA was used with a standard SQL SELECT statement, as was the ODBC Driver for Oracle and OO4O, and finally I used the ODBC Driver for Oracle in conjunction with PL/SQL tables, and Oracle's Oracle Provider for OLE DB with a reference cursors as just described. The Y-axis shows the amount of time taken to complete each test in seconds. I also monitored the CPU and memory usage and they were all very similar for each test.
You can see that there is not that much difference between each method. When choosing which method to use, the underlying factor will always be good database design and coding practices.
Don't forget that you can download all of the SQL and ASP scripts for this chapter from the Wrox web site at http://www.wrox.com.
Comments