MYSQLI 手册翻译的疑惑

这是在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的话会降低性能、减少内存消耗
谢谢!

阅读 2.8k
1 个回答

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

撰写回答
你尚未登录,登录后可以
  • 和开发者交流问题的细节
  • 关注并接收问题和回答的更新提醒
  • 参与内容的编辑和改进,让解决方法与时俱进
推荐问题