Oracle COMMIT Options
Oracle COMMIT Options is a SQL statement in the Oracle Specific category. Oracle: COMMIT with options — WRITE BATCH for async commit (faster but less durable), WAIT/NOWAIT for control. The syntax is COMMIT [WORK] [COMMENT 'text'] [WRITE [BATCH] [WAIT|NOWAIT]];. It returns commit executed. A typical example: COMMIT; -- Standard sync commit (maximum durability) COMMIT WRITE BATCH NOWAIT; -- Async commit: faster but may lose last microsecond of data on crash -- Use for batch operations where some data loss is acceptable COMMIT COMMENT 'Monthly payroll update'; -- Adds a comment to the commit (visible in recovery) SET COMMIT_WRITE = BATCH,NOWAIT; -- Session-level setting for async commits A close relative is SEQUENCE (Oracle), which oracle: generates sequential numbers. Independent of tables. Accessed via NEXTVAL and CURRVAL. A close relative is ROWNUM / FETCH FIRST, which oracle: ROWNUM assigns sequential numbers to rows. Used for limiting results (pre-12c). A close relative is SYSDATE / CURRENT_DATE, which oracle: returns the current date and time of the database server.