SQL adaptation guide for IBM Netezza 6.x / BDL programming |
A lot of BDL programs use pessimistic locking in order to avoid several users editing the same rows at the same time.
DECLARE cc CURSOR FOR SELECT ... FROM tab WHERE ... FOR UPDATE OPEN cc FETCH cc <-- lock is acquired ... CLOSE cc <-- lock is released
In both Informix® and Netezza®, locks are released when closing the cursor or when the transaction ends.
Netezza does not support SELECT FOR UPDATE statements.
You must review the program logic if you use SELECT FOR UPDATE statements. Actually Netezza systems are designed for data warehouse applications, not for OLTP applications. In a DW context, concurrent data access is not required or a priority.