Changes

Jump to navigation Jump to search
1 byte added ,  09:54, 21 July 2022
# The query is parsed, i.e., the original query string is transformed to an executable tree representation.
# External values that are passed on by APIs are bound to variables and the query context. External values can be names of databases, or contribute to a name that will be assembled later on be constructed in the query.
# The query is compiled and evaluated.
The [[Transaction_Management|transaction manager]] gathers the names of the databases that will be accessed by a query. If it is not possible to uniquely identify all databases that may be opened by the query, global locking will be applied, and all databases will be locked. Detection can fail if the names of databases depend on external input. It can also fail if a query is too complex to associate character strings with database operations.
Compilation The compilation phase has now been split into two separate steps:
# ''Compilation'' of logical, context-independent operations. External values are bound to the query, and deterministic code is rewritten, simplified and pre-evaluated.
# ''Optimization'' of physical, context-based operations. Addressed databases Databases are opened and checked for available indexes; current date/time is retrieved. The resulting code is further rewritten and optimized.
Lock detection will be performed after the first step, and the code resulting from this step offers much more insight into which specific databases need to be locked. As a result, local locks can be applied to many more queries than before, and many queries can now run in parallel. An example:
Bureaucrats, editor, reviewer, Administrators
13,550

edits

Navigation menu