此过程超出了php的3GB内存限制,我无法扩展内存限制
$query = "select id from clients order by id asc";
$clients = $storage->executeSQL($query,\PDO::FETCH_OBJ);
foreach ($clients as $client){
$percentage = $stats->getCompletitionById($client->id);
$update = "UPDATE clients SET profile_percentage = ".$percentage." WHERE id = ".$client->id;
$storage->executeSQL($update, \PDO::FETCH_OBJ, array(), true);
}
在php或doctrine
(executeSQL函数使用原则)中,有任何方法可以释放较长时间的内存