Hi Ollier,
I believe it's because PROD tenant had much more data than DEV tenant.
The "select all(*)" approach on BO queries can be very dangerous! Be careful with that... Imagine if DEV tenant has 500 instances, but what about if PROD tenant has 100000 instances? Even if it doesn't have that much, it will probably have a higher number in the future...
I cannot say your problem happened because of that, but it would definitely be my guessing.
Hope this helps!
Fernando