Differentiated between remote and local database execution