Background: I am running some scripts that have to cleanup few thousand records. While running it from spanner console, I am usually getting errors like - 'Transaction was aborted. It was wounded by a higher priority transaction...' OR simply 'Transaction is aborted'
I can understand it may be due to some conflict with real time requests (discussion for another day). So I am trying GCP suggested partitioned-dml for such operation.
Problem: I have noticed that partitioned-dml is very slow and it times out very soon when I am running it from Cloudshell.
What I tried: I tried even with few records but it takes a lot of time and with records in thousands it times out.
Sample script- gcloud spanner databases execute-sql --instance=<> --enable-partitioned-dml --sql='Delete from ABC where X="M" and Y="N"'
Error message returned on cloud shell-
"ERROR: (gcloud.spanner.databases.execute-sql) ('The read operation timed out',) This may be due to network connectivity issues. Please check your network settings, and the status of the service you are trying to reach."