echo '开始时间'.date('H:i:s').PHP_EOL;
$db = Yii::$app->db;
$transaction = $db->beginTransaction();
for($i = 1; $i < 250001; $i++) {
$db->createCommand("update up set uin = $i, name = 'ggggg' where id = $i;")->execute();
}
$transaction->commit();
echo '结束时间'.date('H:i:s').PHP_EOL;