Summary of performance Rules
Now let's review the rules:
* Avoid including adovbs.inc files and use constants in other ways.
* When a single Recordset is used, the connection string is passed to the ActiveConnection property.
* When multiple recordsets are used on a page, create a Connection object and reuse it in the ActiveConnection property.
* Use the simplest types of pointers and locks that best fit your task.
* Use the Adodb.recordset class to sample recordsets for best performance and maximum flexibility.
* Avoid using disconnected recordsets unless required in a disconnected environment.
* Do not worry about setting the recordset properties individually.
* Use the GetString method to extract data when the values in the recordset do not need to be treated in a special way and can be formatted as a uniform format.
* When you need more flexibility in design, but do not need to work with the recordset's metadata, use the GetRows method to extract the data into an array.
* When you need the flexibility and metadata to design, constrain your domain to local variables before entering a data recovery loop. Avoid referencing fields by name.
* Do not use temporary strings to collect output.
Conclusion
Again, one of the most important things we've learned from these tests is that small changes can have a big impact on performance. If we compare the first Test with the ado__09.asp (the fastest result of the cycle in the Recordset), we can see at least a 50% reduction in the reaction time.
If we compare the first test with the fastest in all tests, that is, using getstring, the reaction time is only a small fraction of the original value.
So remember, never take it for granted. If you're not sure, run some targeted tests.
This article related data: Http://www.asptoday.com/articles/images/20000426.zip.