最近的项目上面做大数据插入时总提示内存超出限制
不管怎样unset结果内存仍然很大!
最终发现是CI的机制导致,只要关闭掉问题解决了
$this->db->save_queries = FALSE;它会把所有执行的SQL保存一份在内存做调试;果断关了!
这东西是从v1.6开始就有
Added $this->DB->save_queries variable to DB driver, enabling queries to get saved or not. Previously they were always saved.
解决CodeIgniter大量查询sql时占用内存大问题,布布扣,bubuko.com
原文:http://my.oschina.net/Jacker/blog/291823