0
Answered

Replace Temp with Query - Time?

Camilo Sandoval hace 4 años actualizado por Rodrigo Zayit hace 4 años 2

Si la query se pone más compleja, no tardaría más tiempo en ejecutarse el código ya que hay que llamarla varias veces?

Image 813

Answered

Oi!

Sim, você deve ficar de olho no desempenho enquanto executa esta refatoração. Por outro lado, você obtém um único local onde pode implementar algum tipo de cache.

I was going to say the same Alexander says... when you have in one place, you can implement something like this:

Just to explain one thing, I've used number or null instead of just number think that in one hypothetical scenario the result can be zero, so it'll cache zero as well and not execute the complex calculation again.