Closed amshehzad closed 1 year ago
I'm sorry, but your two queries do two things very differently. Your first example use joins, while the second doesn't, so they are not a direct comparison.
But why do the tests fail sometimes? isn't that strange? I mean it should not fail. if there is some issue on data if should fail everytime
Hi, I was writing a unit test for one my method, but strangely it does fails sometimes. here is my method:
If I do it using the Eloquoent approach, which you can see is commented, it works and doesn't fail. I've repeated the tests 50 times and it does fail occasionally if I use powerJoins
Here I repeated 100 times and it fails 6 times ( I'm using same test data )
and here is when I tried using Eleqount approach: