Patent ID: 8793276

Claim:
A method implemented by a computing system in response to execution of program code by a processor of the computing system, the method comprising: receiving a first query from a client device at a first database node of a database instance comprising two or more database nodes; determining a second database node of the two or more database nodes associated with the first query; compiling the first query at the first database node to generate first compiled code; and transmitting the first compiled code and a first identifier of the second database node from the first database node to the client device; receiving a second query from the client device at the first database node; determining a third database node of the two or more database nodes associated with the second query; compiling the second query to generate second compiled code; transmitting the second compiled code and a second identifier of the third database node to the client device; storing the first compiled code in association with the first identifier in the client device; storing the second compiled code in association with the second identifier in the client device; determining, at the client device, to execute the first query; identifying, at the client device, the first compiled code and the first identifier based on the first query; transmitting the first compiled code from the client device to the second database node based on the first identifier; receiving the first compiled code at the second database node; generating query results using the first compiled code at the second database node; transmitting the query results to the client device; determining, at the client device, to execute the second query; identifying, at the client device, the second compiled code and the second identifier based on the second query; transmitting the second compiled code from the client device to the third database node based on the second identifier; receiving the second compiled code at the third database node; generating second query results using the second compiled code at the third database node; and transmitting the second query results to the client device.