there might be possible that your query is taking time so just
execute the statements seperatly from the procedure and then find out which query is taking time


shailendra