Updatable Cursors Optimize Query Design | VantageCloud Lake - Using Updatable Cursors to Optimize Query Design - Teradata VantageCloud Lake

Lake - Working with SQL

Deployment
VantageCloud
Edition
Lake
Product
Teradata VantageCloud Lake
Release Number
Published
February 2025
ft:locale
en-US
ft:lastEdition
2025-11-21
dita:mapPath
jbe1714339405530.ditamap
dita:ditavalPath
pny1626732985837.ditaval
dita:id
jbe1714339405530

In ANSI mode, you can define a cursor for the query results and for every row in the query results to update or delete the data row using the cursor associated with the row.

Therefore, instead of identifying a search condition, update and delete operations identify a cursor (or a pointer) to a specific row to be updated or deleted.

You can use pocketable cursors to update each row of a select result independently, as processed.

Recommendations

To reap the full benefit from the updatable cursor feature, minimize:
  • The size of query result and number of updates/transaction
  • The length of time you hold the cursor open
Using multiple updates per cursor may not be optimal because:
  • Multiple updates per cursor block other transactions.
  • The system requires longer rollbacks.

Use the MultiLoad utility to do updates.