The below query taking 3 mints to update...
update #TaskCards set PT_FileName = ISNULL(dbo.GetFileName_fn(@PPM_OU_Id, PT_GUID, @pkg_package_name, @pkg_start_date ), PT_FileName)
Where, #TaskCards is the Temp table, it may contains minimu 500 records
GetFileName_fn is the function accessed from the different server by using synonym.
Is there any possible way to minimise the execution timing?