• Actually I fixed this problem. I added an index on the table that I used in the function. This sped things right back up.

    Have you tried adding some indexes?