Is it possible from ASP .NET through the latest MySQL .NET connector to use persistent connections? I've experimented with this several times, but without any good luck.
How would I go by doing this?
Edit开发者_JS百科: By persistent I mean keeping the database connection open, and using only 1 connection for everything.
This gets asked frequently, and the answer is usually connection pooling is what you are trying to accomplish. A connection pool is a list of recently opened and unused connections that get reused, shortening the time to setup a brand new connection. Older connections that don't get used in a certain amount of time get closed. Reference: Other Stack Overflow questions and answers regarding connection pools
Possible. Sounds like you were doing connection pooling. Take a look at
http://www.mysqlperformanceblog.com/2006/11/12/are-php-persistent-connections-evil/
Forgot to add the link to the mysql docs: http://dev.mysql.com/doc/refman/5.5/en/apis-php-mysqli.persistconns.html
精彩评论