Important Notice: Our web hosting provider recently started charging us for additional visits, which was unexpected. In response, we're seeking donations. Depending on the situation, we may explore different monetization options for our Community and Expert Contributors. It's crucial to provide more returns for their expertise and offer more Expert Validated Answers or AI Validated Answers. Learn more about our hosting issue here.

What are the respective effects of the ;NOWAIT (the default) and ;WAIT directives in the context of a remote COPY command within a READ loop ?

0
Posted

What are the respective effects of the ;NOWAIT (the default) and ;WAIT directives in the context of a remote COPY command within a READ loop ?

0

Let us consider the following abbreviated example : read row = localdb.emp setvar rec_emp.ename = ename copy rec_emp to remotedb.emp endread In this example, the COPY statement to a remote database remotedb is NOWAITed (the default) : Warehouse will continue to process the script, reading from localdb and inserting toremotedb, without waiting for a response from the remote Warehouse server for each remote operation. This is a significant performance optimization as operations are interleaved. NOWAIT has implications when used inside a TRY/RECOVER block. Should an error occur during a NOWAITed COPY, the RECOVER statement would not be entered with the record that had the error. On the other hand, if the COPY statement were coded as follows : copy rec_emp to remotedb.emp; wait Warehouse would wait until the remote COPY operation completed before reading the next row from the source. Should an error occur during a WAITed COPY, RECOVER would be entered with the specific record that had the

Related Questions

What is your question?

*Sadly, we had to bring back ads too. Hopefully more targeted.

Experts123