Solution: It takes much longer to run a stored procedure than run the code inside the stored procedure 17.05.2011