• Yes, I did benchmark your code Razvan. Did you try your test-code yourself?

    Running your test-code above gives 763 milliseconds for my function and 1,563 milliseconds for your function.

    Mine is faster and I think that is because SQL is not very fast handling two variables as in your function.


    N 56°04'39.16"
    E 12°55'05.25"