Home > Backend Development > PHP Tutorial > 请教为什么PDO->construct这么耗时啊?

请教为什么PDO->construct这么耗时啊?

WBOY
Release: 2016-06-20 12:35:40
Original
1097 people have browsed it

我做了一个页面,分页刷新数据非常慢,左右想不通,后来用webgrind分析了一下发现PDO->__construct这个构造函数执行的非常慢,都要1秒钟了。非常疑惑,这个函数怎么这么慢,把图片贴上来,请大神指教。


回复讨论(解决方案)

PDO::__construct 将完成数据库连接的操作

source:php.cn
Statement of this Website
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template