#Database query and error when executing in the production environment: 504 Timeout.
4 messages · Page 1 of 1 (latest)
The table in question has a little more than 40 thousand rows...
Then I guess that's the problem, the query is too expensive and either should look why regex is needed and maybe it could be written differently, maybe split into multiple queries or needs indexes.
I'd say you could do ddRawSql or dd the sql depending on laravel version and run the raw sql directly in database to see how long it takes, maybe explain analyze, but if it truly takes extremely long time it might not be advised on a production database.