Would this work where the database names are only known at run time?
Right now, our locking is based on static code analysis; runtime information won’t be included. In the longer term, we would like to extend our compiler to perform multiple steps:
1. Static parsing 2. Static optimizations (pre-evaluate 1+2 to 3, etc.) 3. Dynamic optimizations (reoptimize the query with query parameters and other context information) 4. Physical optimizations (open databases, utilize available index structures)
Queries that have been parsed and statically compiled (Step 1+2) could be stored as compiled queries, or kept in main-memory and duplicated before dynamic optimizations take place. This could further reduce access times in RESTXQ applications – and it would allow us to improve locking, as we could do the lock check after Step 3.