Welcome Guest, Not a member yet? Register   Sign In
Can I force index usage?
#1

I'm facing performance issues with a specific MySQL query due to the index not being used as intended. After investigating, I believe forcing the index to be used could improve execution times. However, I'm uncertain about how to achieve this while keeping the current query format, which uses the model:

php
$SearchModel->whereNotIn('id', $SelectedProfiles);
$ChunkedProfiles = $SearchModel->findAll(1);
Is it possible to force index usage while maintaining this query format with the model? Your insights and guidance would be appreciated.
Reply




Theme © iAndrew 2016 - Forum software by © MyBB