Level 4
Someone help me :(
Hi, guys. I try to execute simple query:
// $codes array contains 4k+ values
$wheels = Wheel::select(array('Wheel_Size'))->whereIn('Product_code', $codes)->get();
My first problem, that SQL Server not supported more then 2100 parameters in one query, so I must explode my $codes array by packs with 2000 values and after query I should merge that all in one collection.
But second and main problem, that query with 2000 parameters executed 11 seconds in Laravel, direct query into database via workbench executed 1 second.
Where is problem? How it resolve?
Please or to participate in this conversation.