In an embodiment, a query system sends compact code to a database service for expansion of the compact code to partially-expanded code and expanded code. In an embodiment, a hash value is generated based on the partially-expanded code and indexed in memory with the expanded code. In an embodiment, a hash value is received as part of a command and expanded code is identified based on the hash value and sent to a database service.