Laravel application experiencing database timeouts when using firstOrNew or firstOrCreate methods in production with large number of records
I'm encountering performance issues with a Laravel application deployed in a production environment. The application is designed to register views for videos, and it utilizes the firstOrNew method to retrieve or create device records for each view. However, regardless of…