PHP runs out of memory despite limiting & offsetting query
Background A raw SQL query with many joins and selects and whatnots, when loaded with $results = DB::SELECT($query) creates a ~500mb, 450,000 items $results collection, which is not good. Solution So the $query now instead creates a temporary table, which…