Connect to the buffer pool to improve database performance

Source: Internet
Author: User
If your ASP Application Program When interacting with a database (I think I must access the database, what else should I do with ASP ?), Using the connection buffer pool will greatly improve the database performance. the time it takes to establish a data connection is not insignificant with system resources. when each page for creating a database connection instance is accessed, a new connection object will be created and destroyed after the page is executed, if many people visit your site at the same time, visitors will find that the system performance is getting low.

The connection buffer pool maintains a connection to the instance so that you can use the database connection at any time. for example, you have an ASP page that creates a connection to the SQL database, extracts some data from the database, and displays it on the web page. if the connection buffer pool is not enabled, ASP operates as follows:

Create a database connection
Submit a query request to the database
Get Data
Show data
Destroy connection

Each time you click on the page, the server will perform these operations. However, when the connection buffer pool is enabled, the related steps are as follows:

Check whether there are unused connections in the buffer pool.
If yes, use the connection. If no, create a new connection.
Submit a query request to the database
Get Data
Show data
Return the connection to the buffer pool

When you need to establish database connections on the page, repeated use of connections can save a lot of system resources.

Now let's take a look at how to make ASP applications use the connection buffer pool. First, you have to open the connection buffer pool in the ASP registration entry in the Registry, and then set SQL Server to use TCP/IP sockets.

To enable the connection buffer pool in the registry, Run regedit and find the registry key:

HKEY_LOCAL_MACHINE/system/CurrentControlSet/services/w3svc/asp/paramet
ERS
(If you do not have this key, create one by yourself)

Find the startconnectionpool key and change the key value from 0 to 1. After this change, ADO and ASP will enable the connection buffer pool.

The last step is to set SQL Server to use TCP/IP sockets. Start the SQL Server Manager and set the default network to TCP/IP sockets .(Note: The Connection buffer pool is invalid for ASP applications that use access as the background database..)

From: http://www.7i24.com

Contact Us

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

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.