Which of the following commands are not blocking operations? (Choose two.)
Which of the following commands are not blocking operations? (Choose two.)
In the context of database operations, non-blocking commands are those that do not significantly lock resources and allow other operations to proceed concurrently. INSERT operations are generally non-blocking because they typically only affect new partitions and do not prevent other operations on the same table. Similarly, COPY commands, especially in data loading scenarios, are managed in the background with minimal locking, allowing other operations to run concurrently. Therefore, INSERT and COPY are both non-blocking operations.
BD The following guidelines apply in most situations: COMMIT operations (including both AUTOCOMMIT and explicit COMMIT) lock resources, but usually only briefly. UPDATE, DELETE, and MERGE statements hold locks that generally prevent them from running in parallel with other UPDATE, DELETE, and MERGE statements. Most INSERT and COPY statements write only new partitions. Those statements often can run in parallel with other INSERT and COPY operations, and sometimes can run in parallel with an UPDATE, DELETE, or MERGE statement.
Sorry INSERT and COPY. https://docs.snowflake.com/en/sql-reference/transactions.html Transactional operations acquire locks on a resource, such as a table, while that resource is being modified. Locks block other statements from modifying the resource until the lock is released. The following guidelines apply in most situations: COMMIT operations (including both AUTOCOMMIT and explicit COMMIT) lock resources, but usually only briefly. UPDATE, DELETE, and MERGE statements hold locks that generally prevent them from running in parallel with other UPDATE, DELETE, and MERGE statements. Most INSERT and COPY statements write only new partitions. Those statements often can run in parallel with other INSERT and COPY operations, and sometimes can run in parallel with an UPDATE, DELETE, or MERGE statement.
Here's why the other options are not typically blocking: B. INSERT (Non-blocking): Inserting new data typically doesn't block other operations on the same table. Snowflake manages insertions efficiently and allows concurrent access for reads and other inserts. D. COPY (Non-blocking in most cases): The COPY command for loading data is usually non-blocking. Snowflake manages the loading process in the background and allows other operations to proceed without interruption.
Answer is BD Explanation: Only UPDATE and DELETE DML operations are blocked when a table is locked. INSERT operations are NOT blocked. UPDATE, DELETE, and MERGE statements hold locks that generally prevent them from running in parallel with other UPDATE, DELETE, and MERGE statements. Most INSERT and COPY statements write only new partitions.
BD is correct
Correct
BD is correct
BD is correct
INSERT MERGE https://docs.snowflake.com/en/sql-reference/transactions.html
Wrong. In link you shared: ...Most INSERT and COPY statements write only new partitions. Those statements often can run in parallel with other INSERT and COPY operations... So I guess INSERT & COPY are correct answers.