当前位置:Gxlcms > PHP教程 > MYSQLI手册翻译的疑惑

MYSQLI手册翻译的疑惑

时间:2021-07-01 10:21:17 帮助过:4人阅读

这是在mysqli_stmt_fetch中的一段英文。
Data are transferred unbuffered without calling mysqli_stmt_store_result() which can decrease performance (but reduces memory cost).
这句话是指使用store_result会降低性能但减少内存消耗,还是指不用store_result的话会降低性能、减少内存消耗
谢谢!

回复内容:

这是在mysqli_stmt_fetch中的一段英文。
Data are transferred unbuffered without calling mysqli_stmt_store_result() which can decrease performance (but reduces memory cost).
这句话是指使用store_result会降低性能但减少内存消耗,还是指不用store_result的话会降低性能、减少内存消耗
谢谢!

意思应该是不使用mysqli_stmt::store_result的话,会降低性能,但能节省内存.
因为mysqli_stmt::store_result会把所有结果一次性全部传回到PHP程序中,性能肯定更高,但内存占用也会比fetch逐条从MySQL取记录到PHP程序多.

人气教程排行