Started having the following errors as the size of my database grow. It's at about 4GB now for this table with millions of rows.
Laravel cant handle large tables?
$count = DB::table('table1')->distinct('data')->count(["data"]); $count2 = DB::table('table2')->distinct('data')->count(["data"]); SQLSTATE[HY000]: General error: 2014 Cannot execute queries while other unbuffered queries are active. Consider using PDOStatement::fetchAll(). Alternatively, if your code is only ever going to run against mysql, you may enable query buffering by setting the PDO::MYSQL_ATTR_USE_BUFFERED_QUERY attribute. (SQL: select count(distinct data) as aggregate from data)
Sign in to participate in this thread!
The Laravel portal for problem solving, knowledge sharing and community building.
The community