Requesting help in fixing an issue with respect to executing mysql query using laravel query builder #49280
Replies: 1 comment 7 replies
-
Attaching the raw query generated for reference.
|
Beta Was this translation helpful? Give feedback.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
-
Hi Everyone,
We have a project which built using Laravel. We were facing one peculiar issue, where the query executed using DB facade/query builder is getting executed against the MySQL database for very long time(> 500 secs), whereas the raw query generated from the same query object getting executed within 2 seconds directly in mysql client or even when the raw query is executed from the code using DB::select($rawQuery). We have compared the raw queries and both are exactly same.
We have lot of queries in our application which are built using DB facade/query builder, but we are not facing this issue elsewhere. In one particular flow alone we are facing this issue and we are clueless on why it is happening.
We couldnt find any related discussions or posts in any other sites as well regarding this behaviour. I could see posts or blogs on slowness of eloquent but not on DB facade/query builder.
Can someone throw us light on why this is happening?
Thanks in advance..!
Beta Was this translation helpful? Give feedback.
All reactions