Is this right way to do READ UNCOMMITTED?
$cars = Cars
::raw('SET SESSION TRANSACTION ISOLATION LEVEL READ UNCOMMITTED;')
->Active()->get();
Is this right way to do READ UNCOMMITTED?
$cars = Cars
::raw('SET SESSION TRANSACTION ISOLATION LEVEL READ UNCOMMITTED;')
->Active()->get();
You should use:
Cars::raw('SET TRANSACTION ISOLATION LEVEL READ UNCOMMITTED');
and than
$cars = Cars::all();
to get all cars for example.
You should never use READ UNCOMMITTED unless you are generating random number and dont care about the data returned.