What are the Best Practices when using Snowflake Transactions?

  1. A transaction should contain statements that are related and should succeed or fail together.
  2. Larger transactions can improve performance in some cases.
  3. Overly large transactions can reduce parallelism or increase deadlocks.
  4. Snowflake recommends keeping AUTOCOMMIT enabled and using explicit transactions as much as possible.
  5. Avoid changing AUTOCOMMIT merely to start a new transaction implicitly.
  6. Avoid executing more than one BEGIN TRANSACTION statement in a row. Extra BEGIN TRANSACTION statements make it harder to see where a transaction actually begins.
Author: user

Leave a Reply