Bulk copying edges concerns

I need to copy edges from one node to another. This is what my mutation looks like.
len(pUid) could be in millions, are there any known concerns with running such large number of mutations in single transaction?

upsert {
  query {
        qx(func: type(A)) @filter(uid_in(~p, "0x17954")) {
          pUid as uid
        }
  } 
  mutation @if(gt(len(pUid), 0)) {
  set  {
      <0x17959> <p> uid(pUid) .
	  }
  }
}

Is there any upper limit to number of mutations in single transaction? Is it preferred to run this in batches of small size (X) ?

upsert {
  query {
        qx(func: type(A), offset: 0, first: X) @filter(uid_in(~p, "0x17954")) {
          pUid as uid
        }
  } 
  mutation @if(gt(len(pUid), 0)) {
  set  {
      <0x17959> <p> uid(pUid) .
	  }
  }
}

That’s the best practice. If you don’t have enough resources you should limit your transactions.