Improve Performance When Deleting or Updating Rows

  1. Ensure that your table has a primary key.
  2. Disable the DBIDIRECTEXEC system option by specifying the OPTIONS statement:
    options nodbidirectexec;
  3. Specify the CURSOR_TYPE=FORWARD_ONLY option in your LIBNAME statement:
    libname delpg postgres server="myserverIP" db=myDatabase user=myUser
               pwd=myPWD cursor_type=forward_only;

You might need to enable the DBIDIRECTEXEC system option after you complete your updates. This system option enables other functions or procedures to run within the PostgreSQL database. To enable DBIDIRECTEXEC, specify this OPTIONS statement:

options dbidirectexec;
Last updated: February 3, 2026