PDO: Improve Performance with Persistent ConnectionTag: PHP Data Objects, PDO, dll, extension, PHP extension, attribute, persistent connection Category: PHP Databasepost: 20 Apr 2008 read: 1,238 PHP Data Objects (PDO) Step By Step Tutorial - Part 15: Persistent connections are known as way to improve performance. When a persistent connection is requested, PHP checks if there's already an identical persistent connection from earlier remained open. If it exists, it uses it. What meaning of remained open? Persistent connection are links that do not close when the execution of your script ends. An 'identical' connection is a connection that was opened to the same host, with the same username and the same password. How do use it at PDO? PDO have PDO::ATTR_PERSISTENT. We set in the PDO constructor:
Please, look at line 10. |
| | Give Your Opinion | Recommend |
|


