Task scheduling in database systems
AssigneeSnowflake Inc.
InventorsIstvan Cseri, Torsten Grabs, Benoit Dageville
Life of this patent
Estimating the term…
Abstract
Systems, methods, and devices for executing a task on database data in response to a trigger event are disclosed. A method includes executing a transaction on a table comprising database data, wherein executing the transaction comprises generating a new table version. The method includes, in response to the transaction being fully executed, generating a change tracking entry comprising an indication of one or more modifications made to the table by the transaction and storing the change tracking entry in a change tracking stream. The method includes executing a task on the new table version in response to a trigger event.
Claims34
A method comprising:
- executing a transaction on a table comprising one or more immutable micro-partitions storing database data, the executing of the transaction comprising generating a new table version on a new micro-partition, the new table version including updated database data that reflects the transaction;
- in response to the transaction being fully executed, generating a change tracking entry distinct from the new table, comprising an indication of one or more modifications made to the table by the transaction;
- entering the change tracking entry into a change tracking stream;
- executing a task, distinct from the transaction, on the new table version;
- querying the change tracking stream to determine whether the table can be discarded;
- and
- discarding the table based on a determination that a query result from the change tracking stream indicates the table can be discarded.
A system comprising:
- at least one processor;
- and
- one or more non-transitory computer readable storage media containing instructions that, when executed by the at least one processor, cause the at least one processor to perform the operations comprising:
- executing a transaction on a table comprising one or more immutable micro-partitions storing database data, the executing of the transaction comprising generating a new table version on a new micro-partition, the new table version including updated database data that reflects the transaction;
- generating a change tracking entry in response to the transaction being fully executed, the change tracking entry being distinct from the new table and comprising an indication of one or more modifications made to the table by the transaction;
- entering the change tracking entry into a change tracking stream;
- executing a task on the new table version;
- querying the change tracking stream for determining the table can be discarded;
- and
- discarding the table based on a determination that a query result from the change tracking stream indicates the table can be discarded.
Non-transitory computer readable storage media storing instructions that, when executed by one or more processors, cause the one or more processors to perform operations comprising:
- executing a transaction on a table comprising one or more immutable micro-partitions storing database data, the executing of the transaction comprising generating a new table version on a new micro-partition, the new table version including updated database data that reflects the transaction;
- in response to the transaction being fully executed, generating a change tracking entry distinct from the new table, comprising an indication of one or more modifications made to the table by the transaction;
- entering the change tracking entry into a change tracking stream;
- executing a task on the new table version;
- querying the change tracking stream for determining the table can be discarded;
- and
- discarding the table based on a determination that a query result from the change tracking stream indicates the table can be discarded.
A system comprising:
- one or more processors;
- and
- data storage containing instructions executable by the one or more processors to perform operations comprising:
- executing a transaction on a table comprising one or more immutable micro-partitions storing database data, the executing of the transaction comprising generating a new table version on a new micro-partition, the new table version including updated database data that reflects the transaction;
- in response to the transaction being fully executed, generating a change tracking entry distinct from the new table, comprising an indication of one or more modifications made to the table by the transaction;
- entering the change tracking entry into a change tracking stream;
- executing a task on the new table version;
- querying the change tracking stream for determining the table can be discarded;
- and
- discarding the table based on a determination that a query result from the change tracking stream indicates the table can be discarded.
Dependencies are inferred from the claim text.