Details
-
Task
-
Resolution: Fixed
-
Major
-
None
-
None
-
Security Level: Public
-
None
Description
Add support for prepared statement:
We will hash the query on the client side to generate the prepared name.
We will pass in the prepared name, along with a query for preparing the statement.
If the prepared statement doesn't exist, based on Colm's new change the query we passed along will get executed, and in effect the statement will become prepared on that node. The Query plan will be returned if the prepared statement didn't exist.
It requires us checking the result set for #operator. If we see that, we know we just prepared a statement, and didn't execute one as when a statement is prepared the query plan comes back.
If we see the #operator, then we have to retry the same query again, (which will execute on a different node) until we receive the results.
This means when a statement is initially prepared there will be N (query nodes) + 1 requests before receive the results. Prior to Colm's change this would have been (N*2) +1.