Приглашаем посетить
Html (html.find-info.ru)

Section 14.4.  Persistent Connections

Previous
Table of Contents
Next

14.4. Persistent Connections

You can switch to persistent connections in MySQL by changing the function call from mysql_connect( ) to mysql_pconnect( ). They both take the same parameters, with the difference being that mysql_connect( ) will always open a new connection, whereas mysql_pconnect( ) will open a new connection only if there is not one already available. Otherwise, it will just use the existing connection. Similarly, the SQLite function sqlite_open( ) has a persistent counterpart, sqlite_popen( ).

Section 14.4.  Persistent Connections

In the per-process Apache module (prefork), persistent resources such as persistent MySQL connections are stored per process. This means if you have 150 Apache children running, you'll need 150 MySQL permanent connectionseven if some of those processes aren't using MySQL right now.



Previous
Table of Contents
Next