Try to determine slowest query: - "SELECT ... FROM AFDELING A INNER JOIN STAMDATA_PRG_EXT ..." or - "select v509Index from VAREFRVSTR_DETAIL ..." or - "Insert into VareFrvStr_Detail ..."
Problem can be with indexes - check whether all indexes exists in new DB (after restore). Also check your INSERT triggers on VAREFRVSTR_DETAIL (if any).