Welcome Guest, Not a member yet? Register   Sign In
Query Builder: regex error when passing large array to where_in
#6

(02-18-2019, 04:01 AM)objecttothis Wrote:
(02-15-2019, 11:52 AM)kilishan Wrote: I would chunk the data into smaller pieces. Should work fine then.

Yes, it doesn't error if I put the UPDATE into the foreach loop but that means that I am doing 12,000+ hits against the database which takes longer than if the WHERE_IN array could handle a 12k long array.  

In the end I abandoned Query Builder for this transaction in favor of db->query() due to the limitations of not being able to do a join with an update or get an efficient solution by breaking the query into two.

Well you wouldn't chunk one row at a time, just someone your server can easier handle - like 1000 rows or 2000? Drastically cuts the number of queries down, and still protects your server's memory usage as the size of the dataset grows.
Reply


Messages In This Thread
RE: Query Builder: regex error when passing large array to where_in - by kilishan - 02-18-2019, 07:07 AM



Theme © iAndrew 2016 - Forum software by © MyBB