PHP PDO Buffered query problem

前端 未结 3 1091
小鲜肉
小鲜肉 2020-12-10 07:10

I\'m having some serious problems with the PHP Data Object functions. I\'m trying to loop through a sizeable result set (~60k rows, ~1gig) using a buffered query to avoid fe

3条回答
  •  伪装坚强ぢ
    2020-12-10 07:48

    Or maybe you could try mysql functions instead:

    while ($row = mysql_fetch_row($query)) {
    ...
    }
    

    Which will definitely be faster, since that foreach statement makes an impression to use fetchAll() instead fetch() each row

提交回复
热议问题