US9053153B2ActiveUtilityA1
Inter-query parallelization of constraint checking
Est. expiryJun 18, 2032(~5.9 yrs left)· nominal 20-yr term from priority
Inventors:Ivan Schreter
G06F 17/3051G06F 17/30445G06F 16/24565G06F 16/24532G06F 16/2308G06F 16/2329
47
PatentIndex Score
0
Cited by
25
References
21
Claims
Abstract
A plurality of operations are executed on tables of a database with at least a portion of the operations being executed in parallel. A constraint check is performed for each operation subsequent to its execution to determine whether data stored in the database affected by the operation is valid, during this constraint checking additional operations and/or constraint checks on the same table are allowed to run in parallel. Based on this constraint checking, operations for which the constraint check determines that the data is not valid are invalidated. Related apparatus, systems, techniques and articles are also described.
Claims
exact text as granted — not AI-modifiedWhat is claimed is:
1. A non-transitory computer program product storing instructions that, when executed by at least one programmable processor, cause the at least one programmable processor to perform operations comprising:
executing a plurality of operations on tables of an insert-only, in-memory database, at least a portion of the operations being executed in parallel, wherein rows of the database are given monotonically-increasing row identifiers and the database uses multi-version concurrency control, and wherein the operations are selected from a group consisting of insert, update, and delete operations;
performing, for each operation subsequent to its execution, a constraint check to determine whether data stored in the database affected by the operation is valid, wherein for each insert or update operation the corresponding constraint check is limited to row identifiers existing prior to the execution of the corresponding operation; and
invalidating operations subsequent to their execution for which the constraint check determines that the data is not valid;
wherein the constraint checks are parallelized inter-query and are parallelized intra-query.
2. A computer program product as in claim 1 , wherein at least a portion of the constraint checks are performed in parallel.
3. A computer program product as in claim 1 , wherein invalidating operations comprises:
executing the corresponding operation in a subtransaction; and
performing a subtransaction rollback for the corresponding operation in case of a failed constraint check.
4. A computer program product as in claim 1 , wherein the operations further comprise:
identifying, for each row in the database, whether the row has been fully checked; and
wherein performing the constraint checks comprise:
determining that an operation violating the constraint check against a row in the database identified as being fully checked indicates a definitive constraint violation; and
determining that an operation violating the constraint check against a row in the database not identified as being fully checked requires a recheck after the row is fully checked.
5. A computer program product as in claim 4 , wherein the operations further comprise:
repeating the constraint checks if the operation violated a constraint check against a row in the database which was not identified as being fully checked at such time as the corresponding row is identified as being fully checked.
6. A computer program product as in claim 1 , wherein the constraint checks are selected from a group consisting of: uniqueness checks, referential integrity checks, and value domain checks.
7. A method comprising:
executing a plurality of operations on tables of an insert-only, in-memory database, at least a portion of the operations being executed in parallel, wherein rows of the database are given monotonically-increasing row identifiers and the database uses multi-version concurrency control, and wherein the operations are selected from a group consisting of insert, update, and delete operations;
performing, for each operation subsequent to its execution, a constraint check to determine whether data stored in the database affected by the operation is valid, wherein for each insert or update operation the corresponding constraint check is limited to row identifiers existing prior to the execution of the corresponding operation; and
invalidating operations subsequent to their operation for which the constraint check determines that the data is not valid;
wherein referential integrity constraint checks are parallelized intra-query by placing shared locks on referred-to rows before execution of a corresponding operation.
8. A method as in claim 7 , wherein at least a portion of the constraint checks are performed in parallel.
9. A method as in claim 7 , wherein invalidating operations comprises:
executing the corresponding operation in a subtransaction; and
performing a subtransaction rollback for the corresponding operation in case of a failed constraint check.
10. A method as in claim 7 , further comprising:
identifying, for each row in the database, whether the row has been fully checked; and
wherein performing the constraint checks comprise:
determining that an operation violating the constraint check against a row in the database identified as being fully checked indicates a definitive constraint violation; and
determining that an operation violating the constraint check against a row in the database not identified as being fully checked requires a recheck after the row is fully checked.
11. A method as in claim 10 further comprising:
repeating the constraint checks if the operation violated a constraint check against a row in the database which was not identified as being fully checked at such time as the corresponding row is identified as being fully checked.
12. A method as in claim 7 , wherein the constraint checks are selected from a group consisting of: uniqueness checks, referential integrity checks, and value domain checks.
13. A non-transitory computer program product storing instructions that, when executed by at least one programmable processor, cause the at least one programmable processor to perform operations comprising:
executing a plurality of operations on tables of a database with at least a portion of the operations being executed in parallel, wherein rows of the database are given monotonically-increasing row identifiers and the database uses multi-version concurrency control, and wherein the operations are selected from a group consisting of insert, update, and delete operations;
performing, for each operation subsequent to its execution, a constraint check to determine whether data stored in the database affected by the operation is valid, wherein the database maintains a listing of those rows that successfully passed all constraint checks, wherein for each insert or update operation the corresponding constraint check is limited to row identifiers existing prior to the execution of the corresponding operation; and
invalidating operations subsequent to their execution for which the constraint check determines that the data is not valid, wherein the constraint checks are parallelized inter-query and are parallelized intra-query.
14. A system comprising:
at least one programmable data processor; and
memory storing instructions which, when executed by the at least one programmable data processor, result in operations comprising:
executing a plurality of operations on tables of an insert-only, in-memory database, at least a portion of the operations being executed in parallel, wherein rows of the database are given monotonically-increasing row identifiers and the database uses multi-version concurrency control, and wherein the operations are selected from a group consisting of insert, update, and delete operations;
performing, for each operation subsequent to its execution, a constraint check to determine whether data stored in the database affected by the operation is valid, wherein for each insert or update operation the corresponding constraint check is limited to row identifiers existing prior to the execution of the corresponding operation; and
invalidating operations subsequent to their execution for which the constraint check determines that the data is not valid;
wherein the constraint checks are parallelized inter-query and are parallelized intra-query.
15. A system as in claim 14 , wherein at least a portion of the constraint checks are performed in parallel.
16. A system as in claim 14 , wherein the invalidating comprises:
executing the corresponding operation in a subtransaction; and
performing a subtransaction rollback for the corresponding operation in case of a failed constraint check.
17. A system as in claim 14 , wherein the operations further comprise:
identifying, for each row in the database, whether the row has been fully checked; and wherein performing the constraint checks comprise:
determining that an operation violating the constraint check against a row in the database identified as being fully checked indicates a definitive constraint violation; and
determining that an operation violating the constraint check against a row in the database not identified as being fully checked requires a recheck after the row is fully checked.
18. A system as in claim 17 , wherein the operations further comprise:
repeating the constraint checks if the operation violated a constraint check against a row in the database which was not identified as being fully checked at such time as the corresponding row is identified as being fully checked.
19. A system as in claim 14 , wherein the constraint checks are selected from a group consisting of: uniqueness checks, referential integrity checks, and value domain checks.
20. A method comprising:
executing a plurality of operations on tables of a database with at least a portion of the operations being executed in parallel, wherein rows of the database are given monotonically-increasing row identifiers and the database uses multi-version concurrency control, and wherein the operations are selected from a group consisting of insert, update, and delete operations;
performing, for each operation subsequent to its execution, a constraint check to determine whether data stored in the database affected by the operation is valid, wherein the database maintains a listing of those rows that successfully passed all constraint checks, wherein for each insert or update operation the corresponding constraint check is limited to row identifiers existing prior to the execution of the corresponding operation; and
invalidating operations subsequent to their execution for which the constraint check determines that the data is not valid, wherein the constraint checks are parallelized inter- query and are parallelized intra-query.
21. A system comprising:
at least one programmable data processor; and
memory storing instructions which, when executed by the at least one programmable data processor, result in operations comprising:
executing a plurality of operations on tables of a database with at least a portion of the operations being executed in parallel, wherein rows of the database are given monotonically-increasing row identifiers and the database uses multi-version concurrency control, and wherein the operations are selected from a group consisting of insert, update, and delete operations;
performing, for each operation subsequent to its execution, a constraint check to determine whether data stored in the database affected by the operation is valid, wherein the database maintains a listing of those rows that successfully passed all constraint checks, wherein for each insert or update operation the corresponding constraint check is limited to row identifiers existing prior to the execution of the corresponding operation; and
invalidating operations subsequent to their execution for which the constraint check determines that the data is not valid, wherein the constraint checks are parallelized inter-query and are parallelized intra-query.Cited by (0)
No later patents cite this yet.
References (0)
No backward citations on record.